summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libs/nixio/Makefile')
-rw-r--r--libs/nixio/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/nixio/Makefile b/libs/nixio/Makefile
index 2a7552daf..fb91388d0 100644
--- a/libs/nixio/Makefile
+++ b/libs/nixio/Makefile
@@ -10,6 +10,7 @@ AXTLS_VERSION = 1.2.1
AXTLS_DIR = axTLS
AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz
NIXIO_TLS ?= openssl
+NIXIO_SHADOW ?= $(shell echo 'int main(void){ return !getspnam("root"); }' | $(CC) -include shadow.h -xc -o/dev/null - 2>/dev/null && echo yes)
NIXIO_SO = nixio.so
NIXIO_LDFLAGS =
@@ -45,6 +46,10 @@ ifeq ($(NIXIO_TLS),)
NIXIO_CFLAGS += -DNO_TLS
endif
+ifneq ($(NIXIO_SHADOW),yes)
+ NIXIO_CFLAGS += -DNO_SHADOW
+endif
+
ifeq ($(OS),SunOS)
NIXIO_LDFLAGS += -lsocket -lnsl -lsendfile