summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorSijmen J. Mulder <ik@sjmulder.nl>2018-06-15 09:37:43 +0200
committerSijmen J. Mulder <ik@sjmulder.nl>2018-06-15 09:37:43 +0200
commit69f863ed7e7475db5aa13b89fbc10b3f9152413c (patch)
tree7d7bb813b8b13e4b5c5f4983ac4b6ee75bee320f /src/Makefile
parenta7f9e7d9584c90862791d7c19d663841dd82ac9c (diff)
Add NO_WORDEXP codepaths for OpenBSD
OpenBSD does not implement wordexp(). For rationale, see: http://openbsd-archive.7691.n7.nabble.com/patch-libc-wordexp-support-td159368.html This commit adds support for a NO_WORDEXP macro and enables it on OpenBSD. If the macro is defined, shell expansion is simply skipped.
Diffstat (limited to 'src/Makefile')
-rwxr-xr-xsrc/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index cf183d2..bfe6124 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -92,6 +92,11 @@ ifneq ($(shell uname -s),FreeBSD)
LDLIBS += -ldl
endif
+# OpenBSD does not implement wordexp()
+ifeq ($(shell uname -s),OpenBSD)
+ CFLAGS += -DNO_WORDEXP
+endif
+
ifneq (, $(shell which pkg-config))
# Any system with pkg-config