summaryrefslogtreecommitdiffstats
path: root/src/openvpn/forward.c
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2012-02-29 22:12:15 +0200
committerDavid Sommerseth <davids@redhat.com>2012-03-22 22:53:39 +0100
commit3d163bc544ab9dfc62d9a2c865f8abb865bf6eb3 (patch)
treed4ec60463290c45c2b201797099214d854edc042 /src/openvpn/forward.c
parentdc81e743989640cc681a40e69455cc9fc736ab9c (diff)
downloadopenvpn-3d163bc544ab9dfc62d9a2c865f8abb865bf6eb3.tar.gz
openvpn-3d163bc544ab9dfc62d9a2c865f8abb865bf6eb3.tar.xz
openvpn-3d163bc544ab9dfc62d9a2c865f8abb865bf6eb3.zip
build: move gettimeofday() emulation to compat
Remove all references to gettimeofday() from main project. SIDE EFFECT: mingw will use its own internal gettimeofday(). Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn/forward.c')
-rw-r--r--src/openvpn/forward.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index e13b81a..57c7846 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -1094,7 +1094,7 @@ process_outgoing_link (struct context *c)
* Let the traffic shaper know how many bytes
* we wrote.
*/
-#ifdef HAVE_GETTIMEOFDAY
+#ifdef ENABLE_FEATURE_SHAPER
if (c->options.shaper)
shaper_wrote_bytes (&c->c2.shaper, BLEN (&c->c2.to_link)
+ datagram_overhead (c->options.ce.proto));
@@ -1383,7 +1383,7 @@ io_wait_dowork (struct context *c, const unsigned int flags)
* quota, don't send -- instead compute the delay we must wait
* until it will be OK to send the packet.
*/
-#ifdef HAVE_GETTIMEOFDAY
+#ifdef ENABLE_FEATURE_SHAPER
int delay = 0;
/* set traffic shaping delay in microseconds */
@@ -1398,9 +1398,9 @@ io_wait_dowork (struct context *c, const unsigned int flags)
{
shaper_soonest_event (&c->c2.timeval, delay);
}
-#else /* HAVE_GETTIMEOFDAY */
+#else /* ENABLE_FEATURE_SHAPER */
socket |= EVENT_WRITE;
-#endif /* HAVE_GETTIMEOFDAY */
+#endif /* ENABLE_FEATURE_SHAPER */
}
else
{