packages/net/atlas-probe/patches/004-Comment-out-librt-testing.patch
Eneas U de Queiroz 281df4bcf5 atlas-probe: Fix compilation with gcc11
This uses some definitions from <sys/cdefs.h> in gcc 8.4.0, not present
in musl or gcc11.

Also use clock_gettime() instead of syscall(__NR_clock_gettime,...),
which is not currently defined.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-10-13 22:21:28 -07:00

32 lines
1.3 KiB
Diff

From df50c29210f18f959186bb974c33cefff2bcc15e Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cotequeiroz@gmail.com>
Date: Fri, 8 Oct 2021 22:34:37 -0300
Subject: [PATCH] Comment out librt testing
The packages feed Ci is apparently failing to execute the test:
Makefile.flags:128: *** unterminated call to function 'shell':
missing ')'. Stop.
The call appears to be correct, but we already know that the library
will not be needed for openwrt, so let's just leave it out.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -125,10 +125,10 @@ export SYSROOT=$(CONFIG_SYSROOT)
endif
# glibc versions before 2.17 need to link with -rt to use clock_gettime
-RT_NEEDED := $(shell echo -e '#include <time.h>\nint main(void){struct timespec tp; return clock_gettime(CLOCK_MONOTONIC, &tp);}' >rttest.c; $(CC) $(CFLAGS) -o /dev/null rttest.c >/dev/null 2>&1 || echo "y"; rm rttest.c)
-ifeq ($(RT_NEEDED),y)
-LDLIBS += rt
-endif
+#RT_NEEDED := $(shell echo -e '#include <time.h>\nint main(void){struct timespec tp; return clock_gettime(CLOCK_MONOTONIC, &tp);}' >rttest.c; $(CC) $(CFLAGS) -o /dev/null rttest.c >/dev/null 2>&1 || echo "y"; rm rttest.c)
+#ifeq ($(RT_NEEDED),y)
+#LDLIBS += rt
+#endif
# Android has no separate crypt library
# gcc-4.2.1 fails if we try to feed C source on stdin: