Oops, this caused two link errors in a testdir of all modules:

gcc -ftrapv  -Wno-error -g -O2  -L/media/develdata/devel/inst-x86_64-64/lib 
-rdynamic -o test-execute-child test-execute-child.o  -lm -lm -lm -lm -lm -lm 
-lm -lm -lm -lm -lm
/usr/bin/ld: test-execute-child.o: in function `main':
/media/develdata/devel/GNULIB/testdir-all/build-64/gltests/../../gltests/test-execute-child.c:243:
 undefined reference to `rpl_abort'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:19082: test-execute-child] Error 1

gcc -ftrapv  -Wno-error -g -O2  -L/media/develdata/devel/inst-x86_64-64/lib 
-rdynamic -o test-spawn-pipe-child test-spawn-pipe-child.o  -lm -lm -lm -lm -lm 
-lm -lm -lm -lm -lm -lm
/usr/bin/ld: test-spawn-pipe-child.o: in function `main':
/media/develdata/devel/GNULIB/testdir-all/build-64/gltests/../../gltests/test-spawn-pipe-child.c:116:
 undefined reference to `rpl_abort'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:22282: test-spawn-pipe-child] Error 1

Fixed as follows.


2024-05-17  Bruno Haible  <br...@clisp.org>

        tests: Fix link errors (regression today).
        * tests/test-execute-child.c (abort): Undefine.
        * tests/test-spawn-pipe-child.c (abort): Likewise.

diff --git a/tests/test-execute-child.c b/tests/test-execute-child.c
index 7660c7cc18..cf76fbc4fd 100644
--- a/tests/test-execute-child.c
+++ b/tests/test-execute-child.c
@@ -56,6 +56,7 @@ is_device (int fd)
 #endif
 
 /* In this file, we use only system functions, no overrides from gnulib.  */
+#undef abort
 #undef atoi
 #undef close
 #undef fcntl
diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c
index a87ce64850..bc71c79f73 100644
--- a/tests/test-spawn-pipe-child.c
+++ b/tests/test-spawn-pipe-child.c
@@ -42,6 +42,7 @@
 static FILE *myerr;
 
 /* In this file, we use only system functions, no overrides from gnulib.  */
+#undef abort
 #undef atoi
 #undef close
 #undef fcntl




Reply via email to