Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
nsh: fix build with upcoming stdio changes
To:
ports@openbsd.org
Cc:
stsp@openbsd.org, tom.smyth@wirelessconnect.eu, yasuoka@openbsd.org
Date:
Mon, 20 May 2024 20:33:17 +0200

Download raw body.

Thread
extern.h depends on stdio.h because of FILENAME_MAX. wchar.h will stop
pulling in stdio.h, hence break the build in utf8.c which will no longer
pull in stdio.h. The diff below fixes the build.

Longer term it would be preferable to make extern.h self-standing so it
doesn't depend on other headers being pulled in.

Also, these obj hacks in the port are really annoying (this breaks
generating patches as it is owned by _pbuild:_pbuild and has perms 770).

Index: Makefile
===================================================================
RCS file: /cvs/ports/shells/nsh/Makefile,v
diff -u -p -r1.49 Makefile
--- Makefile	3 Mar 2024 16:48:10 -0000	1.49
+++ Makefile	20 May 2024 18:24:40 -0000
@@ -5,6 +5,7 @@ HOMEPAGE =	https://www.nmedia.net/nsh/
 V =		1.2
 DISTNAME =	nsh-${V}
 SITES =		https://github.com/yellowman/nsh/releases/download/v${V}/
+REVISION =	0
 
 MAINTAINER =	Tom Smyth <tom.smyth@wirelessconnect.eu>
 
Index: patches/patch-utf8_c
===================================================================
RCS file: patches/patch-utf8_c
diff -N patches/patch-utf8_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-utf8_c	20 May 2024 18:24:48 -0000
@@ -0,0 +1,11 @@
+Index: utf8.c
+--- utf8.c.orig
++++ utf8.c
+@@ -16,6 +16,7 @@
+  */
+ 
+ #include <errno.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <wchar.h>