--- build.xml.orig 2013-08-18 23:32:57.000000000 +0900 +++ build.xml 2013-08-18 23:32:57.000000000 +0900 @@ -696,7 +696,12 @@ - + + + + + + --- src/native/Makefile.am.orig 2012-05-09 05:34:52.000000000 +0900 +++ src/native/Makefile.am 2012-09-02 12:56:57.000000000 +0900 @@ -51,7 +51,7 @@ src/org/apache/hadoop/io/nativeio/errno_enum.c \ src/org/apache/hadoop/io/nativeio/NativeIO.c libhadoop_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) -libhadoop_la_LIBADD = -ldl -ljvm +libhadoop_la_LIBADD = # #vim: sw=4: ts=4: noet --- src/native/acinclude.m4.orig 2012-05-09 05:34:52.000000000 +0900 +++ src/native/acinclude.m4 2012-09-01 23:29:18.000000000 +0900 @@ -13,8 +13,10 @@ ac_cv_libname_$1="`objdump -p conftest | grep NEEDED | grep $1 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`" elif test ! -z "`which ldd | grep -v 'no ldd'`"; then ac_cv_libname_$1="`ldd conftest | grep $1 | sed 's/^[[[^A-Za-z0-9]]]*\([[[A-Za-z0-9\.]]]*\)[[[^A-Za-z0-9]]]*=>.*$/\"\1\"/'`" + elif test ! -z "`which otool | grep -v 'no otool'`"; then + ac_cv_libname_$1=\"`otool -L conftest | grep $1 | sed -e 's/^[ ]*//' -e 's/ .*//' -e 's/.*\/\(.*\)$/\1/'`\"; else - AC_MSG_ERROR(Can't find either 'objdump' or 'ldd' to compute the dynamic library for '-l$1') + AC_MSG_ERROR(Can't find either 'objdump' or 'ldd' or 'otool' to compute the dynamic library for '-l$1') fi else ac_cv_libname_$1=libnotfound.so --- src/native/configure.ac.orig 2012-11-19 19:50:49.000000000 +0900 +++ src/native/configure.ac 2012-12-03 22:49:42.000000000 +0900 @@ -55,9 +55,7 @@ JNI_LDFLAGS="" if test $JAVA_HOME != "" then - JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server" - JVMSOPATH=`find $JAVA_HOME/jre/ -name libjvm.so | head -n 1` - JNI_LDFLAGS="$JNI_LDFLAGS -L`dirname $JVMSOPATH`" + JNI_LDFLAGS= fi ldflags_bak=$LDFLAGS LDFLAGS="$LDFLAGS $JNI_LDFLAGS" @@ -73,7 +71,7 @@ AC_CHECK_HEADERS([stdio.h stddef.h], [], AC_MSG_ERROR(Some system headers not found... please ensure their presence on your platform.)) dnl Check for JNI headers -JNI_CPPFLAGS="" +JNI_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers" if test $JAVA_HOME != "" then for dir in `find $JAVA_HOME/include -follow -type d` --- src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c.orig 2012-05-09 05:34:52.000000000 +0900 +++ src/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c 2012-09-01 23:46:54.000000000 +0900 @@ -73,7 +73,8 @@ // was successfull or not (as long as it was called we need to call // endnetgrent) setnetgrentCalledFlag = 1; - if(setnetgrent(cgroup) == 1) { + setnetgrent(cgroup); + if (true) { UserList *current = NULL; // three pointers are for host, user, domain, we only care // about user now