From 6da4b7b4e64278cb52b3ad0eec70a8746bd53110 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Mon, 14 Jul 2014 17:59:23 +0000 Subject: [PATCH] HADOOP-10780. hadoop_user_info_alloc fails on FreeBSD due to incorrect sysconf use (trtrmitya via cmccabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1610472 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../native/src/org/apache/hadoop/security/hadoop_user_info.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e9fdc92b87f..ce9ef402747 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -22,6 +22,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10507. FsShell setfacl can throw ArrayIndexOutOfBoundsException when no perm is specified. (Stephen Chu and Sathish Gurram via cnauroth) + HADOOP-10780. hadoop_user_info_alloc fails on FreeBSD due to incorrect + sysconf use (Dmitry Sivachenko via Colin Patrick McCabe) + Release 2.5.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c index 566da64fba0..ca288ec7da2 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c @@ -36,7 +36,7 @@ struct hadoop_user_info *hadoop_user_info_alloc(void) { struct hadoop_user_info *uinfo; - size_t buf_sz; + long buf_sz; char *buf; uinfo = calloc(1, sizeof(struct hadoop_user_info));