summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2015-08-05 06:50:44 +0000
committermrg <mrg@NetBSD.org>2015-08-05 06:50:44 +0000
commitb5635f20a17679b3868d24afa7ff588ea9462dc0 (patch)
treef282e8b5bf85455ae360e7dd9fcd0a07d80a8022 /libexec
parentcc14ecd516f1556d52fe2caf999f0e84c0ddc3b8 (diff)
on QNX, use nbutil.h.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/httpd/Makefile17
-rw-r--r--libexec/httpd/bozohttpd.h7
2 files changed, 22 insertions, 2 deletions
diff --git a/libexec/httpd/Makefile b/libexec/httpd/Makefile
index 1dd9271d570..db2e3e48e94 100644
--- a/libexec/httpd/Makefile
+++ b/libexec/httpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2015/04/16 02:32:33 mrg Exp $
+# $NetBSD: Makefile,v 1.24 2015/08/05 06:50:44 mrg Exp $
#
# $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
#
@@ -15,6 +15,10 @@
# DO_HTPASSWD /* support .htpasswd files */
# NO_LUA_SUPPORT /* don't support Lua for dynamic content */
#
+# other system specific defines:
+# HAVE_NBUTIL_H /* netbsd compat is in <nbutil.h>
+# (don't forget to also enable -lnbutil)
+#
# these are usually set via the "COPTS" variable, or some other method
# for setting CFLAGS relevant to your make, eg
# % make COPTS="-DDO_HTPASSWD"
@@ -33,6 +37,17 @@ DPADD= ${LIBCRYPT} ${LIBLUA} ${LIBM}
WARNS?= 4
+.if defined(.OS.MAKE)
+OPSYS= ${.OS.MAKE}
+.else
+OPSYS:= ${:!uname -s!:S/-//g:S/\///g}
+.endif
+
+.if ${OPSYS} == "QNX"
+CPPFLAGS+= -DHAVE_NBUTIL_H
+LDADD+= -lnbutil
+.endif
+
.include <bsd.own.mk>
.if ${MKCRYPTO} != "no"
diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h
index 77e27ed1d37..861f88e6ccd 100644
--- a/libexec/httpd/bozohttpd.h
+++ b/libexec/httpd/bozohttpd.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.h,v 1.35 2015/05/02 11:35:48 mrg Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.36 2015/08/05 06:50:44 mrg Exp $ */
/* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */
@@ -41,6 +41,11 @@
#endif
#include <stdio.h>
+/* QNX provides a lot of NetBSD things in nbutil.h */
+#ifdef USE_NBUTIL
+#include <nbutil.h>
+#endif
+
/* lots of "const" but gets free()'ed etc at times, sigh */
/* headers */