aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-11-20 10:01:09 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-20 21:52:56 (GMT)
commit594516b4c28a94ca686b17f1e463dfd6712b75a7 (patch)
tree35ea1f20347d6f31dd7836ef1dbaa42948303445 /wlantest
parent461e3ebe434872f840ca43cf86da014af14f9de9 (diff)
downloadhostap-594516b4c28a94ca686b17f1e463dfd6712b75a7.zip
hostap-594516b4c28a94ca686b17f1e463dfd6712b75a7.tar.gz
hostap-594516b4c28a94ca686b17f1e463dfd6712b75a7.tar.bz2
Use monotonic clock for relative time for eloop if available
Relative time shouldn't be calculated based on gettimeofday because that clock can jump (e.g., when the time is adjusted by the system administrator.) On systems where that is available, use CLOCK_BOOTTIME (on fairly recent Linux systems, this clock takes into account the time spend suspended) or CLOCK_MONOTONIC (on Linux and some POSIX systems, this clock is just freely running with no adjustments.) Reported-by: Holger Schurig <holgerschurig@gmail.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/wlantest/Makefile b/wlantest/Makefile
index a08fd54..175fb51 100644
--- a/wlantest/Makefile
+++ b/wlantest/Makefile
@@ -19,6 +19,8 @@ CFLAGS += -I.
CFLAGS += -I../src
CFLAGS += -I../src/utils
+# glibc < 2.17 needs -lrt for clock_gettime()
+LIBS += -lrt
ifndef LDO
LDO=$(CC)
@@ -112,7 +114,7 @@ wlantest: $(OBJS) $(LIBWLANTEST)
$(LDO) $(LDFLAGS) -o wlantest $(OBJS) -L. -lwlantest $(LIBS)
wlantest_cli: $(OBJS_cli) $(LIBWLANTEST)
- $(LDO) $(LDFLAGS) -o wlantest_cli $(OBJS_cli) -L. -lwlantest
+ $(LDO) $(LDFLAGS) -o wlantest_cli $(OBJS_cli) -L. -lwlantest $(LIBS)
test_vectors: $(TOBJS) $(LIBWLANTEST)
$(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) -L. -lwlantest $(LIBS)