This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libiberty] Fix testsuite/test-expandargv.c


I'm not sure why this did not trigger on GNU/Linux distributions,
on FreeBSD 10 one does need to #include <unistd.h> to get to unlink()
which is used by this test.

With this, the test compiles on my i386-unknown-freebsd10.0 tester;
without it, it doesn't.

Okay?

Gerald

2013-10-22  Gerald Pfeifer  <gerald@pfeifer.com>

	* testsuite/test-expandargv.c: Include unistd.h

Index: testsuite/test-expandargv.c
===================================================================
--- testsuite/test-expandargv.c	(revision 203981)
+++ testsuite/test-expandargv.c	(working copy)
@@ -40,6 +40,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #ifndef EXIT_SUCCESS
 #define EXIT_SUCCESS 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]