This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob/fix]: testsuite/gdb.base/fileio.c: Include unistd.h
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 10 Jan 2005 16:58:26 +0100
- Subject: [ob/fix]: testsuite/gdb.base/fileio.c: Include unistd.h
- Reply-to: gdb-patches at sources dot redhat dot com
Hi,
I've applied the below obvious fix. Using lseek(2) requires to include
unistd.h according to SUSv3, see
http://www.opengroup.org/onlinepubs/009695399/functions/lseek.html
Corinna
* gdb.base/fileio.c: Include unistd.h as required for lseek(2).
Index: fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fileio.c,v
retrieving revision 1.7
diff -u -p -r1.7 fileio.c
--- fileio.c 1 Feb 2004 18:51:29 -0000 1.7
+++ fileio.c 10 Jan 2005 15:53:53 -0000
@@ -8,6 +8,7 @@
#include <sys/time.h>
#include <errno.h>
#include <sys/wait.h>
+#include <unistd.h>
/* TESTS :
* - open(const char *pathname, int flags, mode_t mode);
1) Attempt to create file that already exists - EEXIST
@@ -55,7 +56,6 @@ Not applicable.
system (const char * string);
1) Invalid string/command. - returns 127. */
-
static const char *strerrno (int err);
#define FILENAME "foo.fileio.test"
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.