Browse Source

HADOOP-12302. Fix native compilation on Windows after HADOOP-7824 (Vinayakumar B via Colin P. McCabe)

Colin Patrick Mccabe 10 năm trước cách đây
mục cha
commit
4ab49a4365

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

@@ -1050,6 +1050,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12274. Remove direct download link from BULIDING.txt.
     (Caleb Severn via aajisaka)
 
+    HADOOP-12302. Fix native compilation on Windows after HADOOP-7824
+    (Vinayakumar B via Colin P. McCabe)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 2 - 0
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c

@@ -132,6 +132,7 @@ static void setStaticInt(JNIEnv *env, jclass clazz, char *field,
     }
 }
 
+#ifdef UNIX
 /**
  * Initialises a list of java constants that are platform specific.
  * These are only initialized in UNIX.
@@ -187,6 +188,7 @@ static void consts_init(JNIEnv *env) {
   SET_INT_OR_RETURN(env, clazz, S_IWUSR);
   SET_INT_OR_RETURN(env, clazz, S_IXUSR);
 }
+#endif
 
 static void stat_init(JNIEnv *env, jclass nativeio_class) {
   jclass clazz = NULL;