Better checking for shm_open() during configure.
This commit is contained in:
22
auto/shmem
22
auto/shmem
@@ -3,19 +3,13 @@
|
|||||||
# Copyright (C) NGINX, Inc.
|
# Copyright (C) NGINX, Inc.
|
||||||
|
|
||||||
|
|
||||||
# Linux, FreeBSD, MacOSX
|
# FreeBSD, Solaris, MacOSX
|
||||||
|
|
||||||
nxt_feature="shm_open()"
|
nxt_feature="shm_open()"
|
||||||
nxt_feature_name=NXT_HAVE_SHM_OPEN
|
nxt_feature_name=NXT_HAVE_SHM_OPEN
|
||||||
nxt_feature_run=yes
|
nxt_feature_run=yes
|
||||||
nxt_feature_incs=
|
nxt_feature_incs=
|
||||||
nxt_feature_libs=
|
nxt_feature_libs=
|
||||||
|
|
||||||
if [ "$NXT_SYSTEM" = "Linux" ]; then
|
|
||||||
nxt_feature_libs=-lrt
|
|
||||||
NXT_LIBRT=-lrt
|
|
||||||
fi
|
|
||||||
|
|
||||||
nxt_feature_test="#include <sys/mman.h>
|
nxt_feature_test="#include <sys/mman.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@@ -37,6 +31,20 @@ nxt_feature_test="#include <sys/mman.h>
|
|||||||
. auto/feature
|
. auto/feature
|
||||||
|
|
||||||
|
|
||||||
|
if [ $nxt_found = no ]; then
|
||||||
|
|
||||||
|
# Linux and NetBSD 7.0 shm_open() are in librt.
|
||||||
|
|
||||||
|
nxt_feature="shm_open() in librt"
|
||||||
|
nxt_feature_libs="-lrt"
|
||||||
|
. auto/feature
|
||||||
|
|
||||||
|
if [ $nxt_found = yes ]; then
|
||||||
|
NXT_LIBRT=$nxt_feature_libs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
|
|
||||||
nxt_feature="memfd_create()"
|
nxt_feature="memfd_create()"
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
# Linux 2.6.32 CLOCK_REALTIME_COARSE.
|
# Linux 2.6.32 CLOCK_REALTIME_COARSE.
|
||||||
# Linux clock_gettime() is in librt.
|
# Linux clock_gettime() is in librt.
|
||||||
|
|
||||||
NXT_LIBRT=
|
|
||||||
|
|
||||||
nxt_feature="Linux clock_gettime(CLOCK_REALTIME_COARSE)"
|
nxt_feature="Linux clock_gettime(CLOCK_REALTIME_COARSE)"
|
||||||
nxt_feature_name=NXT_HAVE_CLOCK_REALTIME_COARSE
|
nxt_feature_name=NXT_HAVE_CLOCK_REALTIME_COARSE
|
||||||
nxt_feature_run=yes
|
nxt_feature_run=yes
|
||||||
|
|||||||
Reference in New Issue
Block a user