From: Brian Aker Date: Mon, 9 Apr 2012 18:05:59 +0000 (-0700) Subject: Update for compiling on OSX. X-Git-Tag: 1.0.7~8^2^2^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ec18b17736a6e0ce98994daf5a6576e9658e4a1d;p=m6w6%2Flibmemcached Update for compiling on OSX. --- diff --git a/configure.ac b/configure.ac index d24d519f..de2bc881 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,7 @@ AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([memchr]) AC_CHECK_FUNCS([memmove]) AC_CHECK_FUNCS([memset]) +AC_CHECK_FUNCS([pipe2]) AC_CHECK_FUNCS([select]) AC_CHECK_FUNCS([setenv]) AC_CHECK_FUNCS([socket]) diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc index 6fc34031..de7c89d7 100644 --- a/libtest/cmdline.cc +++ b/libtest/cmdline.cc @@ -36,6 +36,11 @@ using namespace libtest; #include #include #include +#include + +#ifndef __USE_GNU +static char **environ= NULL; +#endif extern "C" { static int exited_successfully(int status) @@ -533,7 +538,7 @@ void Application::Pipe::reset() close(READ); close(WRITE); -#if _GNU_SOURCE +#if HAVE_PIPE2 if (pipe2(_pipe_fd, O_NONBLOCK) == -1) #else if (pipe(_pipe_fd) == -1)