aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
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 /hostapd
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 'hostapd')
-rw-r--r--hostapd/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 87ff9b4..b4704ba 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -84,6 +84,14 @@ CONFIG_ELOOP=eloop
endif
OBJS += ../src/utils/$(CONFIG_ELOOP).o
OBJS_c += ../src/utils/$(CONFIG_ELOOP).o
+
+ifeq ($(CONFIG_ELOOP), eloop)
+# Using glibc < 2.17 requires -lrt for clock_gettime()
+LIBS += -lrt
+LIBS_c += -lrt
+LIBS_h += -lrt
+endif
+
OBJS += ../src/utils/common.o
OBJS += ../src/utils/wpa_debug.o
OBJS_c += ../src/utils/wpa_debug.o