diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c8732122fb5..9247e3beed9 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -137,6 +137,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10962. Flags for posix_fadvise are not valid in some architectures (David Villegas via Colin Patrick McCabe) + HADOOP-10966. Hadoop Common native compilation broken in windows. + (David Villegas via Arpit Agarwal) + Release 2.5.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c index 45fa7025f42..eb44a515516 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c @@ -176,6 +176,7 @@ static void nioe_deinit(JNIEnv *env) { * If the value is not known, return the argument unchanged. */ static int map_fadvise_flag(jint flag) { +#ifdef HAVE_POSIX_FADVISE switch(flag) { case org_apache_hadoop_io_nativeio_NativeIO_POSIX_POSIX_FADV_NORMAL: return POSIX_FADV_NORMAL; @@ -198,6 +199,9 @@ static int map_fadvise_flag(jint flag) { default: return flag; } +#else + return flag; +#endif } /*