From a3bbe802819e2e73eb73f64da01b8f32b9134787 Mon Sep 17 00:00:00 2001 From: Magnus Edenhill Date: Tue, 29 Dec 2015 00:51:24 +0100 Subject: [PATCH] Solaris: Check for strndup availability (issue #253) --- configure.librdkafka | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.librdkafka b/configure.librdkafka index 85185e1d34..96d2a18b11 100644 --- a/configure.librdkafka +++ b/configure.librdkafka @@ -63,6 +63,13 @@ function checks { mkl_mkvar_append CPPFLAGS CPPFLAGS "-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__EXTENSIONS__" fi + # Check if strndup() is available (isn't on Solaris 10) + mkl_compile_check "strndup" "HAVE_STRNDUP" disable CC "" \ +"#include +int main (void) { + return strndup("hi", 2) ? 0 : 1; +}" + # Figure out what tool to use for dumping public symbols. # We rely on configure.cc setting up $NM if it exists. if mkl_env_check "nm" "" cont "NM" ; then