Return-Path: X-Original-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C75C8105BB for ; Thu, 17 Oct 2013 23:07:37 +0000 (UTC) Received: (qmail 6468 invoked by uid 500); 17 Oct 2013 23:07:37 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 6431 invoked by uid 500); 17 Oct 2013 23:07:37 -0000 Mailing-List: contact hdfs-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-commits@hadoop.apache.org Received: (qmail 6422 invoked by uid 99); 17 Oct 2013 23:07:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Oct 2013 23:07:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Oct 2013 23:07:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 49516238889B; Thu, 17 Oct 2013 23:07:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1533285 - in /hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/CMakeLists.txt src/main/native/util/posix_util.c Date: Thu, 17 Oct 2013 23:07:16 -0000 To: hdfs-commits@hadoop.apache.org From: cnauroth@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131017230716.49516238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cnauroth Date: Thu Oct 17 23:07:15 2013 New Revision: 1533285 URL: http://svn.apache.org/r1533285 Log: HDFS-5365. Merging change r1533283 from trunk to branch-2. Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1533285&r1=1533284&r2=1533285&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Oct 17 23:07:15 2013 @@ -122,6 +122,8 @@ Release 2.3.0 - UNRELEASED HDFS-5336. DataNode should not output 'StartupProgress' metrics. (Akira Ajisaka via cnauroth) + HDFS-5365. Fix libhdfs compile error on FreeBSD9. (Radim Kolar via cnauroth) + Release 2.2.1 - UNRELEASED INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt?rev=1533285&r1=1533284&r2=1533285&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt Thu Oct 17 23:07:15 2013 @@ -62,6 +62,11 @@ endfunction() INCLUDE(CheckCSourceCompiles) CHECK_C_SOURCE_COMPILES("int main(void) { static __thread int i = 0; return 0; }" HAVE_BETTER_TLS) +# Check if we need to link dl library to get dlopen. +# dlopen on Linux is in separate library but on FreeBSD its in libc +INCLUDE(CheckLibraryExists) +CHECK_LIBRARY_EXISTS(dl dlopen "" NEED_LINK_DL) + find_package(JNI REQUIRED) if (NOT GENERATED_JAVAH) # Must identify where the generated headers have been placed @@ -89,9 +94,13 @@ add_dual_library(hdfs main/native/libhdfs/jni_helper.c main/native/libhdfs/hdfs.c ) +if (NEED_LINK_DL) + set(LIB_DL dl) +endif(NEED_LINK_DL) + target_link_dual_libraries(hdfs ${JAVA_JVM_LIBRARY} - dl + ${LIB_DL} pthread ) dual_output_directory(hdfs target/usr/local/lib) Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c?rev=1533285&r1=1533284&r2=1533285&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c Thu Oct 17 23:07:15 2013 @@ -27,6 +27,7 @@ #include #include #include +#include static pthread_mutex_t gTempdirLock = PTHREAD_MUTEX_INITIALIZER;