[OpenWrt-Devel] [PATCH] odhcp6c: fix compilation with musl 1.2.0
Rosen Penev
rosenp at gmail.com
Wed Mar 25 02:04:32 EDT 2020
SYS_clock_gettime is gone with musl 1.2.0. Define it to the 64 bit version
as musl 1.2.0 uses a 64-bit time_t.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
src/odhcp6c.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/odhcp6c.c b/src/odhcp6c.c
index 19a86f2..6077850 100644
--- a/src/odhcp6c.c
+++ b/src/odhcp6c.c
@@ -44,6 +44,10 @@
#endif
#define ARRAY_SEP " ,\t"
+#ifndef SYS_clock_gettime
+#define SYS_clock_gettime SYS_clock_gettime64
+#endif
+
static void sighandler(int signal);
static int usage(void);
static int add_opt(const uint16_t code, const uint8_t *data,
--
2.25.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list