Author: cnauroth Date: Fri Oct 18 18:20:02 2013 New Revision: 1533577 URL: http://svn.apache.org/r1533577 Log: HDFS-5365. Merging change r1533575 from branch-2 to branch-2.2
Modified: hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c Modified: hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1533577&r1=1533576&r2=1533577&view=diff ============================================================================== --- hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Oct 18 18:20:02 2013 @@ -47,6 +47,8 @@ Release 2.2.1 - UNRELEASED HDFS-5370. Typo in Error Message: different between range in condition and range in error message. (Kousuke Saruta via suresh) + HDFS-5365. Fix libhdfs compile error on FreeBSD9. (Radim Kolar via cnauroth) + Release 2.2.0 - 2013-10-13 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt?rev=1533577&r1=1533576&r2=1533577&view=diff ============================================================================== --- hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt (original) +++ hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt Fri Oct 18 18:20:02 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.2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c?rev=1533577&r1=1533576&r2=1533577&view=diff ============================================================================== --- hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c (original) +++ hadoop/common/branches/branch-2.2/hadoop-hdfs-project/hadoop-hdfs/src/main/native/util/posix_util.c Fri Oct 18 18:20:02 2013 @@ -27,6 +27,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> +#include <limits.h> static pthread_mutex_t gTempdirLock = PTHREAD_MUTEX_INITIALIZER;