Github user phunt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/427#discussion_r157325096
  
    --- Diff: src/c/configure.ac ---
    @@ -130,18 +130,66 @@ main()
      else
        exit(0);
     }
    -], AC_MSG_RESULT(yes) 
    -   ipv6=yes, 
    -   AC_MSG_RESULT(no) 
    -   ipv6=no, 
    -   AC_MSG_RESULT(no) 
    +], AC_MSG_RESULT(yes)
    +   ipv6=yes,
    +   AC_MSG_RESULT(no)
    +   ipv6=no,
    +   AC_MSG_RESULT(no)
        ipv6=no)
     
     if test x"$ipv6" = xyes; then
       USEIPV6="-DZOO_IPV6_ENABLED"
       AC_SUBST(USEIPV6)
     fi
     
    +# use SOCK_CLOEXEC if available and wanted
    +AC_ARG_WITH([sock_cloexec],
    +[AS_HELP_STRING([--with-sock-cloexec],[build with SOCK_CLOEXEC flag set on 
the connections])],
    +[],[with_sock_cloexec=no])
    +
    +AC_MSG_CHECKING([whether SOCK_CLOEXEC is available])
    +
    +AC_TRY_RUN([ /* is SOCK_CLOEXEC available ? */
    +#include <sys/types.h>
    +#include <sys/socket.h>
    +#include <stdlib.h>
    +main()
    +{
    +#ifdef SOCK_CLOEXEC
    +  exit(0);
    +#else
    +  exit(1);
    +#endif
    +}
    +], AC_MSG_RESULT(yes)
    +   has_sock_cloexec=yes,
    +   AC_MSG_RESULT(no)
    +   has_sock_cloexec=no,
    +   AC_MSG_RESULT(no)
    +   has_sock_cloexec=no)
    +
    +if test "x$with_sock_cloexec" != xno && test "x$has_sock_cloexec" = xno; 
then
    +  AC_MSG_WARN([cannot use SOCK_CLOEXEC -- SOCK_CLOEXEC undefined on this 
platform])
    +  with_sock_cloexec=no
    +fi
    +
    +if test "x$with_sock_cloexec" != xno; then
    +AC_MSG_NOTICE([building with SOCK_CLOEXEC])
    +else
    +AC_MSG_NOTICE([building without SOCK_CLOEXEC])
    +fi
    +
    +AS_IF([test x"$with_sock_cloexec" != xno], 
[AC_DEFINE([SOCK_CLOEXEC_ENABLED], [1], [Define to 1, if SOCK_CLOEXEC is 
defined and wanted])])
    +AM_CONDITIONAL([SOCK_CLOEXEC_ENABLED],[test "x$with_sock_cloexec" != xno])
    +
    +# Determine which libraries we need to use clock_gettime
    --- End diff --
    
    Sorry I was unclear @fr0stbyte - I meant the following:
    
    +# Determine which libraries we need to use clock_gettime
    +saved_LIBS="$LIBS"
    +LIBS=""
    +AC_CHECK_LIB(rt, clock_gettime)
    +CLOCK_GETTIME_LIBS=$LIBS
    +AC_SUBST(CLOCK_GETTIME_LIBS)
    +LIBS="$saved_LIBS"
    
    those lines are included in this patch, but not #410 
    
    Could you remove them? Or am I totally missing something?


---

Reply via email to