diff options
-rw-r--r-- | src/lbdecision.cc | 1 | ||||
-rw-r--r-- | src/lboutput.cc | 1 | ||||
-rw-r--r-- | src/loadbalance.cc | 3 | ||||
-rw-r--r-- | src/main.cc | 1 |
4 files changed, 5 insertions, 1 deletions
diff --git a/src/lbdecision.cc b/src/lbdecision.cc index d66849c..665b2a2 100644 --- a/src/lbdecision.cc +++ b/src/lbdecision.cc @@ -13,6 +13,7 @@ #include <net/if.h> #include <string.h> #include <stdlib.h> +#include <unistd.h> #include <sys/types.h> #include <sys/ioctl.h> diff --git a/src/lboutput.cc b/src/lboutput.cc index 28eb001..d146d8e 100644 --- a/src/lboutput.cc +++ b/src/lboutput.cc @@ -9,6 +9,7 @@ #include <sys/time.h> #include <time.h> #include <syslog.h> +#include <unistd.h> #include <iostream> diff --git a/src/loadbalance.cc b/src/loadbalance.cc index 4f42388..80eab13 100644 --- a/src/loadbalance.cc +++ b/src/loadbalance.cc @@ -6,6 +6,7 @@ * by the Free Software Foundation. */ #include <string> +#include <unistd.h> #include "lbpathtest.hh" #include "loadbalance.hh" @@ -114,6 +115,6 @@ LoadBalance::output() void LoadBalance::sleep() { - ::sleep(5); + usleep(5000000); } diff --git a/src/main.cc b/src/main.cc index 05b1fa7..1904885 100644 --- a/src/main.cc +++ b/src/main.cc @@ -12,6 +12,7 @@ #include <syslog.h> #include <stdio.h> #include "stdlib.h" +#include <unistd.h> #include <iostream> #include "loadbalance.hh" |