aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/Makefile
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 /wpa_supplicant/Makefile
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 'wpa_supplicant/Makefile')
-rw-r--r--wpa_supplicant/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 8dcb71b..f6a46d2 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -113,6 +113,13 @@ 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_p += -lrt
+endif
+
ifdef CONFIG_ELOOP_POLL
CFLAGS += -DCONFIG_ELOOP_POLL
endif