wpa_supplicant, eloop_register_timeout() and ntpdate

Holger Schurig holgerschurig
Thu Nov 14 01:36:45 PST 2013


>> My "man clock_gettime" doesn't document CLOCK_BOOTTIME. And it says
>
> Mine does :-)
> manpages v3.54

On Debian Wheezy this won't work. I applied your patch
http://p.sipsolutions.net/b02ac4b02793dfcf.txt and now compilation
yields:

cc -c -o ../src/utils/os_unix.o -MMD -Wall -g -O2 -I../src
-I../src/utils -I/usr/include/libnl3 -DCONFIG_FAKE_SIGNAL_LEVEL=ERROR
-DCONFIG_HT_OVERRIDES -DCONFIG_BACKEND_FILE -DCONFIG_NO_CONFIG_WRITE
-DCONFIG_IEEE80211R -DCONFIG_PEERKEY   -DCONFIG_DRIVER_NL80211
-DCONFIG_LIBNL20 -I/usr/include/libnl3 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS
-DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_LEAP
-DIEEE8021X_EAPOL -DPKCS12_FUNCS -DEAP_TLS_OPENSSL -DCONFIG_SHA256
-DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX
-DCONFIG_CTRL_IFACE_DBUS_NEW -DCONFIG_CTRL_IFACE_DBUS_INTRO
-I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include
-DCONFIG_DBUS -DCONFIG_SME -DCONFIG_DEBUG_SYSLOG
-DCONFIG_DELAYED_MIC_ERROR_REPORT -DCONFIG_BGSCAN_SIMPLE
-DCONFIG_BGSCAN_LEARN -DCONFIG_BGSCAN ../src/utils/os_unix.c
../src/utils/os_unix.c: In function ?os_get_reltime?:
../src/utils/os_unix.c:65:30: error: ?CLOCK_BOOTTIME? undeclared
(first use in this function)
../src/utils/os_unix.c:65:30: note: each undeclared identifier is
reported only once for each function it appears in
make[3]: *** [../src/utils/os_unix.o] Error 1

Debian Wheezy is at libc6:i386 2.13-38 (Embedded GNU C Library: Shared
libraries)



Maybe something like

#ifndef CLOCK_BOOTTIME
#define CLOCK_BOOTTIME 7
#endif

will help?   The Linux kernel will return -EINVAL if the running
kernel doesn't have CLOCK_BOOTTIME implemented, so it's save to wildly
try that value.



More information about the Hostap mailing list