summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@openwide.fr>2015-07-30 17:31:31 +0200
committerRomain Naour <romain.naour@openwide.fr>2015-07-31 14:57:27 +0200
commit0e2be0c217028e73073e7f9ccb010cc8b4d756db (patch)
tree1059dbdd145e2b329d22838d7037a888ae81bb51 /configure.ac
parent24ccb6ebc5e13a128aaedd3a2eb52eef3adf6dcd (diff)
build-sys: check for strndupa
strndupa is a GNU extension, therefore it's not available for all libc libraries (musl). This patch is based on the one proposed by Emil Renner Berthing for systemd [1]. [1] http://lists.freedesktop.org/archives/systemd-devel/2014-September/023190.html Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 01b8ca006b..ccb1012d57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,8 +66,9 @@ AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
-AC_CHECK_DECLS([getrandom, gettid, name_to_handle_at, accept4, mkostemp], [], [], [[#include <sys/types.h>
+AC_CHECK_DECLS([getrandom, gettid, name_to_handle_at, accept4, mkostemp, strndupa], [], [], [[#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <sys/socket.h>