HADOOP-10966. Hadoop Common native compilation broken in windows. (Contributed by David Villegas)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1617823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2014-08-13 20:01:21 +00:00
parent e51a5d691b
commit 2f3ed504c1
2 changed files with 7 additions and 0 deletions

View File

@ -575,6 +575,9 @@ Release 2.6.0 - UNRELEASED
HADOOP-10962. Flags for posix_fadvise are not valid in some architectures HADOOP-10962. Flags for posix_fadvise are not valid in some architectures
(David Villegas via Colin Patrick McCabe) (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 Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -176,6 +176,7 @@ static void nioe_deinit(JNIEnv *env) {
* If the value is not known, return the argument unchanged. * If the value is not known, return the argument unchanged.
*/ */
static int map_fadvise_flag(jint flag) { static int map_fadvise_flag(jint flag) {
#ifdef HAVE_POSIX_FADVISE
switch(flag) { switch(flag) {
case org_apache_hadoop_io_nativeio_NativeIO_POSIX_POSIX_FADV_NORMAL: case org_apache_hadoop_io_nativeio_NativeIO_POSIX_POSIX_FADV_NORMAL:
return POSIX_FADV_NORMAL; return POSIX_FADV_NORMAL;
@ -198,6 +199,9 @@ static int map_fadvise_flag(jint flag) {
default: default:
return flag; return flag;
} }
#else
return flag;
#endif
} }
/* /*