Set _BSD_SOURCE=1 via CFLAGS to ensure BSD functions remain visible.

os.h sets _XOPEN_SOURCE and with that functions like strcasestr() no
longer show up and with that compilers do silly things.

The build system is so arcane that it seems best to just pass
-D_BSD_SOURCE=1 via CFLAGS to override the _XOPEN_SOURCE exclude.
With this CFLAGS_base-clang is no longer needed.

OK sthen@ tb@
This commit is contained in:
claudio
2026-01-06 14:08:59 +00:00
parent 130fceee9a
commit 8b0371ec58
+2 -4
View File
@@ -4,7 +4,7 @@ FIX_EXTRACT_PERMISSIONS=Yes
V = 1.9.0
JV = 1
REVISION = 1
REVISION = 2
EXTRACT_SUFX = .tar.xz
DISTNAME = john-$V-jumbo-${JV}
@@ -20,8 +20,6 @@ PERMIT_PACKAGE = Yes
COMPILER = base-clang ports-gcc
COMPILER_LANGS = c
CFLAGS_base-clang = -Wno-error=int-conversion
WANTLIB += c crypto m nspr4 nss3 pcap plc4 plds4 smime3
WANTLIB += nssutil3 ssl ssl3 z
@@ -43,7 +41,7 @@ WRKSRC = ${WRKDIST}/src
COPTFLAGS := ${CFLAGS}
CFLAGS += -c -DHAVE_NSS `pkg-config --cflags nss` \
-DJOHN_SYSTEMWIDE=1 \
-DJOHN_SYSTEMWIDE=1 -D_BSD_SOURCE=1 \
-DJOHN_SYSTEMWIDE_HOME='\"${SYSCONFDIR}/john\"'
LDFLAGS += -lssl -lcrypto -lm -lz `pkg-config --libs nss`