openat: Work around compilation error with OSF/1 5.1 DTK cc.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Sep 2011 09:48:23 +0000 (11:48 +0200)
committerIan Beckwith <ianb@erislabs.net>
Thu, 8 Sep 2011 02:16:37 +0000 (03:16 +0100)
* lib/openat.h: Use different syntax for include of <fcntl.h>.
(cherry picked from commit 76074e9af140661560dc1ce16d0a80c2e768a740)

ChangeLog
lib/openat.h

index 56994bc..59d2398 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-07  Bruno Haible  <bruno@clisp.org>
+
+       openat: Work around compilation error with OSF/1 5.1 DTK cc.
+       * lib/openat.h: Use different syntax for include of <fcntl.h>.
+
 2011-09-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        openat: port to AIX 7.1 with large files
index b26571f..fb4f4d8 100644 (file)
@@ -19,7 +19,9 @@
 #ifndef _GL_HEADER_OPENAT
 #define _GL_HEADER_OPENAT
 
-#include <fcntl.h>
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc miscompiles
+   openat.c because that file has a preliminary #include <fcntl.h>.  */
+#include "fcntl.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>