This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libiberty] Fix testsuite/test-demangle.c
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 26 Oct 2013 21:48:11 +0200 (CEST)
- Subject: [libiberty] Fix testsuite/test-demangle.c
- Authentication-results: sourceware.org; auth=none
This is similar to my fix for testsuite/test-expandargv.c last week.
I'm still not sure why this does not trigger on GNU/Linux distributions,
or earlier version of FreeBSD. On FreeBSD 10 one does need to #include
<unistd.h> to get getpagesize which is used by the test.
With this, the test now compiles on my i386-unknown-freebsd10.0 tester;
without it, it doesn't.
Okay?
Gerald
2013-10-26 Gerald Pfeifer <gerald@pfeifer.com>
* testsuite/test-demangle.c: Include unistd.h.
Index: libiberty/testsuite/test-demangle.c
===================================================================
--- libiberty/testsuite/test-demangle.c (revision 204095)
+++ libiberty/testsuite/test-demangle.c (working copy)
@@ -32,6 +32,9 @@
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
struct line
{