From: Tom de Vries Date: Mon, 7 Sep 2020 09:54:27 +0000 (+0200) Subject: [libatomic, testsuite] Add missing include in atomic-generic.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9c87dc958a2ef3203cbdb88ed1b0575564a4279;p=gcc.git [libatomic, testsuite] Add missing include in atomic-generic.c When compiling atomic-generic.c from the libatomic testsuite, we run into: ... $ gcc src/libatomic/testsuite/libatomic.c/atomic-generic.c -latomic src/libatomic/testsuite/libatomic.c/atomic-generic.c: In function ‘main’: src/libatomic/testsuite/libatomic.c/atomic-generic.c:31:7: warning: \ implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration] if (memcmp (&a, &zero, size)) ^~~~~~ ... Fix this by adding the missing string.h include. Tested on x86_64. libatomic/ChangeLog: * testsuite/libatomic.c/atomic-generic.c: Include string.h. --- diff --git a/libatomic/testsuite/libatomic.c/atomic-generic.c b/libatomic/testsuite/libatomic.c/atomic-generic.c index 11ef6c5831d..662467ea82a 100644 --- a/libatomic/testsuite/libatomic.c/atomic-generic.c +++ b/libatomic/testsuite/libatomic.c/atomic-generic.c @@ -9,6 +9,7 @@ #include #include +#include extern void abort();