diff options
author | Tom de Vries <tdevries@suse.de> | 2024-03-29 07:47:30 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-03-29 07:47:30 +0100 |
commit | 221918140b0b4a52674491d7ab4487da02d063a7 (patch) | |
tree | 4ed6d8e4e212e15687c0a4a1881c25e40b69f4a7 /gdb/python/python.c | |
parent | 2f31f965edc0507ca53c129090652744eb76a472 (diff) | |
download | binutils-221918140b0b4a52674491d7ab4487da02d063a7.zip binutils-221918140b0b4a52674491d7ab4487da02d063a7.tar.gz binutils-221918140b0b4a52674491d7ab4487da02d063a7.tar.bz2 |
[gdb/testsuite] Add missing includes in gdb.trace/collection.c
On fedora rawhide, with test-case gdb.trace/collection.exp, I get:
...
gdb compile failed, collection.c: In function 'strings_test_func':
collection.c:227:13: error: implicit declaration of function 'malloc' \
[-Wimplicit-function-declaration]
227 | longloc = malloc(500);
| ^~~~~~
collection.c:1:1: note: \
include '<stdlib.h>' or provide a declaration of 'malloc'
+++ |+#include <stdlib.h>
1 | /* This testcase is part of GDB, the GNU debugger.
collection.c:228:3: error: implicit declaration of function 'strcpy' \
[-Wimplicit-function-declaration]
228 | strcpy(longloc, ... );
| ^~~~~~
collection.c:1:1: note: include '<string.h>' or provide a declaration of \
'strcpy'
+++ |+#include <string.h>
1 | /* This testcase is part of GDB, the GNU debugger.
collection.c:230:8: error: implicit declaration of function 'strlen' \
[-Wimplicit-function-declaration]
230 | i += strlen (locstr);
| ^~~~~~
collection.c:230:8: note: include '<string.h>' or provide a declaration of \
'strlen'
...
Fix this by adding the missing includes.
Tested on aarch64-linux.
Approved-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions