[PATCH] Add missing <fcntl.h> include

Ben Gamari bgamari.foss at gmail.com
Sat Jun 13 23:55:31 PDT 2009


Fix spurious error during build:

fileio.c: In function ‘FontFileOpen’:
fileio.c:51: warning: implicit declaration of function ‘open’
fileio.c:51: warning: nested extern declaration of ‘open’
fileio.c:51: error: ‘O_RDONLY’ undeclared (first use in this function)
fileio.c:51: error: (Each undeclared identifier is reported only once
fileio.c:51: error: for each function it appears in.)
fileio.c:57: warning: implicit declaration of function ‘close’
fileio.c:57: warning: nested extern declaration of ‘close’
---
 src/fontfile/fileio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c
index 3e2f98a..e275a9b 100644
--- a/src/fontfile/fileio.c
+++ b/src/fontfile/fileio.c
@@ -34,6 +34,7 @@ in this Software without prior written authorization from The Open Group.
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include <fcntl.h>
 #include <X11/fonts/fntfilio.h>
 #include <X11/Xos.h>
 #ifndef O_BINARY
-- 
1.6.3.1




More information about the xorg mailing list