Commit fb814d42 authored by Alexandre Janniaux's avatar Alexandre Janniaux
Browse files

configure.ac: check validity of sys/shm.h

Some version of Android < 26 have sys/shm.h but it doesn't contain the
functions that shall be exposed. So as to avoid misconfiguration, only
define HAVE_SYS_SHM_H if the header exists AND that it exposes the
required functions.
parent dde18de7
Pipeline #17644 failed with stage
in 139 minutes and 34 seconds
......@@ -941,7 +941,14 @@ dnl Check for headers
dnl
dnl POSIX
AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/shm.h sys/socket.h sys/uio.h])
dnl Android may have incomplete sys/shm.h header so
dnl we check that the header is correct.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/shm.h>]], [[shmat; shmctl; shmdt; shmget;]])],
[AC_DEFINE([HAVE_SYS_SHM_H], [1], [Define to 1 if sys/shm.h is available])])
AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/socket.h sys/uio.h])
AC_CHECK_HEADERS([net/if.h], [], [],
[
#include <sys/types.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment