diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3babf77bb76..1593f575ae8 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -225,6 +225,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10702. KerberosAuthenticationHandler does not log the principal names 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 HADOOP-10520. Extended attributes definition and FileSystem APIs for diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c index 1177d728221..de73a8ae683 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.c @@ -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 // endnetgrent) setnetgrentCalledFlag = 1; -#ifndef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__MACH__) + setnetgrent(cgroup); + { +#else if(setnetgrent(cgroup) == 1) { #endif current = NULL; @@ -90,9 +93,7 @@ Java_org_apache_hadoop_security_JniBasedUnixGroupsNetgroupMapping_getUsersForNet userListSize++; } } -#ifndef __FreeBSD__ } -#endif //-------------------------------------------------- // build return data (java array)