svn merge -c 1603042 FIXES: HADOOP-10699. Fix build native library on mac osx. Contributed by Binglin Chang

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1603043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2014-06-17 02:25:13 +00:00
parent 0873304b90
commit 40d4304e13
2 changed files with 7 additions and 3 deletions

View File

@ -225,6 +225,9 @@ Release 2.5.0 - UNRELEASED
HADOOP-10702. KerberosAuthenticationHandler does not log the principal names HADOOP-10702. KerberosAuthenticationHandler does not log the principal names
correctly. (Benoy Antony via cnauroth) correctly. (Benoy Antony via cnauroth)
HADOOP-10699. Fix build native library on mac osx (Binglin Chang via
jlowe)
BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS
HADOOP-10520. Extended attributes definition and FileSystem APIs for HADOOP-10520. Extended attributes definition and FileSystem APIs for

View File

@ -73,7 +73,10 @@ Java_org_apache_hadoop_security_JniBasedUnixGroupsNetgroupMapping_getUsersForNet
// was successful or not (as long as it was called we need to call // was successful or not (as long as it was called we need to call
// endnetgrent) // endnetgrent)
setnetgrentCalledFlag = 1; setnetgrentCalledFlag = 1;
#ifndef __FreeBSD__ #if defined(__FreeBSD__) || defined(__MACH__)
setnetgrent(cgroup);
{
#else
if(setnetgrent(cgroup) == 1) { if(setnetgrent(cgroup) == 1) {
#endif #endif
current = NULL; current = NULL;
@ -90,9 +93,7 @@ Java_org_apache_hadoop_security_JniBasedUnixGroupsNetgroupMapping_getUsersForNet
userListSize++; userListSize++;
} }
} }
#ifndef __FreeBSD__
} }
#endif
//-------------------------------------------------- //--------------------------------------------------
// build return data (java array) // build return data (java array)