Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Fix john-jumbo on sparc64 (gcc15)
To:
Sebastian Reitenbach <sebastia@openbsd.org>
Cc:
ports@openbsd.org
Date:
Mon, 15 Dec 2025 20:58:35 +0100

Download raw body.

Thread
  • Claudio Jeker:

    Fix john-jumbo on sparc64 (gcc15)

This code trips over the fact that os.h sets _XOPEN_SOURCE and so
prototypes in system headers under _BSD_SOURCE disapear. This results
in an int-conversion error because strcasestr() is undefined and therefor
defaults to int.

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 the CFLAGS_base-clang are no longer needed.

-- 
:wq Claudio

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/john-jumbo/Makefile,v
diff -u -p -r1.30 Makefile
--- Makefile	29 Aug 2024 20:47:06 -0000	1.30
+++ Makefile	15 Dec 2025 19:51:30 -0000
@@ -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`