From 81f364437608b21e85fc393f63546bf8b425ac71 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Mon, 6 Jul 2015 12:56:34 -0700 Subject: [PATCH] HADOOP-11974. Fix FIONREAD #include on Solaris (Alan Burlison via Colin P. McCabe) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../native/src/org/apache/hadoop/net/unix/DomainSocket.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index fab78d407b..faf5a5c193 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -678,6 +678,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 diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c index a3f27ee4d0..e658d8f67e 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/net/unix/DomainSocket.c @@ -31,7 +31,14 @@ #include #include #include -#include /* for FIONREAD */ + +/* For FIONREAD */ +#if defined(__sun) +#include +#else +#include +#endif + #include #include #include