dd: work around compilation failure on AIX 5.1 and 5.2
authorJim Meyering <meyering@redhat.com>
Tue, 26 Apr 2011 07:09:43 +0000 (09:09 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 26 Apr 2011 07:27:44 +0000 (09:27 +0200)
* src/dd.c (O_NOCACHE): Undefine.  This symbol is defined
via AIX's <fcntl.h>, yet used as an enum name in dd.c.
Reported by Gary V. Vaughan in http://debbugs.gnu.org/8555
* NEWS (Portability): Mention this.

NEWS
src/dd.c

diff --git a/NEWS b/NEWS
index 3307e71..025b564 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,10 @@ GNU coreutils NEWS                                    -*- outline -*-
       Sparse files are relatively unusual, and the copying code incurs
       the performance penalty of the now-mandatory sync only for them.
 
+** Portability
+
+  dd once again compiles on AIX 5.1 and 5.2
+
 
 * Noteworthy changes in release 8.11 (2011-04-13) [stable]
 
index cb626fc..072410e 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
 # define O_CIO 0
 #endif
 
+/* On AIX 5.1 and AIX 5.2, O_NOCACHE is defined via <fcntl.h>
+   and would interfere with our use of that name, below.  */
+#undef O_NOCACHE
+
 #if ! HAVE_FDATASYNC
 # define fdatasync(fd) (errno = ENOSYS, -1)
 #endif