gthr-vxworks-thread.c calls memset in __ghtread_cond_signal, but it
fails ot include <string.h>, where this function is declared, and GCC
14 rejects calls of undeclared functions. Include the required
header.
Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2. Also tested
with trunk on ppc64le-linux-gnu, and with gcc-14 targeting powerpc-elf.
Ok to install?
for libgcc/ChangeLog
* config/gthr-vxworks-thread.c: Include string.h for memset.
---
libgcc/config/gthr-vxworks-thread.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libgcc/config/gthr-vxworks-thread.c
b/libgcc/config/gthr-vxworks-thread.c
index 17c60faba48ff..31f291aca67e3 100644
--- a/libgcc/config/gthr-vxworks-thread.c
+++ b/libgcc/config/gthr-vxworks-thread.c
@@ -33,6 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
#include <taskLib.h>
#include <stdlib.h>
+#include <string.h>
#define __TIMESPEC_TO_NSEC(timespec) \
((long long)timespec.tv_sec * 1000000000 + (long long)timespec.tv_nsec)
--
Alexandre Oliva, happy hacker https://blog.lx.oliva.nom.br/
Free Software Activist FSFLA co-founder GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!