From c9c87dc958a2ef3203cbdb88ed1b0575564a4279 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 7 Sep 2020 11:54:27 +0200 Subject: [PATCH] [libatomic, testsuite] Add missing include in atomic-generic.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- libatomic/testsuite/libatomic.c/atomic-generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libatomic/testsuite/libatomic.c/atomic-generic.c b/libatomic/testsuite/libatomic.c/atomic-generic.c index 11ef6c5..662467e 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(); -- 2.7.4