You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ar...@apache.org on 2014/08/13 22:04:19 UTC

svn commit: r1617824 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common: CHANGES.txt src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c

Author: arp
Date: Wed Aug 13 20:04:19 2014
New Revision: 1617824

URL: http://svn.apache.org/r1617824
Log:
HADOOP-10966: Merging r1617823 from trunk to branch-2.

Modified:
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1617824&r1=1617823&r2=1617824&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Wed Aug 13 20:04:19 2014
@@ -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

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c?rev=1617824&r1=1617823&r2=1617824&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c Wed Aug 13 20:04:19 2014
@@ -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
 }
 
 /*