[OpenWrt-Devel] [PATCHv3] netifd: fix compilation with musl 1.2.0

Rosen Penev rosenp at gmail.com
Wed Mar 25 19:11:40 EDT 2020


Switched to the plain function instead of the now gone syscall.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 v3: no need for linking to librt
 v2: switched to function
 system-linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-linux.c b/system-linux.c
index d533be8..d36d287 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -2421,7 +2421,7 @@ time_t system_get_rtime(void)
 	struct timespec ts;
 	struct timeval tv;
 
-	if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts) == 0)
+	if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
 		return ts.tv_sec;
 
 	if (gettimeofday(&tv, NULL) == 0)
-- 
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