Browse Source

HADOOP-11974. Fix FIONREAD #include on Solaris (Alan Burlison via Colin P. McCabe)

(cherry picked from commit 81f364437608b21e85fc393f63546bf8b425ac71)
Colin Patrick Mccabe 10 years ago
parent
commit
4da63e5f5f

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -175,6 +175,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12045. Enable LocalFileSystem#setTimes to change atime.
     (Kazuho Fujii via cnauroth)
 
+    HADOOP-11974. Fix FIONREAD #include on Solaris (Alan Burlison via Colin P.
+    McCabe)
+
   OPTIMIZATIONS
 
     HADOOP-11785. Reduce the number of listStatus operation in distcp

+ 8 - 1
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c

@@ -31,7 +31,14 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/ioctl.h> /* for FIONREAD */
+
+/* For FIONREAD */
+#if defined(__sun)
+#include <sys/filio.h>
+#else
+#include <sys/ioctl.h>
+#endif
+
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/types.h>