From e20afe69bbd267fc5a1401ed3e137dbd3d399dc9 Mon Sep 17 00:00:00 2001 From: vxtls <187420201+vxtls@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:37:54 -0500 Subject: [PATCH] fix(gawk): patch bundled getopt prototypes to match modern libc declarations --- .../patches/fix-getopt-prototypes.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 steps-guix/gawk-4.2.1/patches/fix-getopt-prototypes.patch diff --git a/steps-guix/gawk-4.2.1/patches/fix-getopt-prototypes.patch b/steps-guix/gawk-4.2.1/patches/fix-getopt-prototypes.patch new file mode 100644 index 00000000..8666a109 --- /dev/null +++ b/steps-guix/gawk-4.2.1/patches/fix-getopt-prototypes.patch @@ -0,0 +1,26 @@ +SPDX-License-Identifier: GPL-3.0-or-later + +Fix legacy getopt declarations that conflict with modern libc headers. + +--- gawk-4.2.1/support/getopt.c ++++ gawk-4.2.1/support/getopt.c +@@ -152,7 +152,7 @@ + whose names are inconsistent. */ + + #ifndef getenv +-extern char *getenv (); ++extern char *getenv (const char *); + #endif + + #endif /* not __GNU_LIBRARY__ */ +--- gawk-4.2.1/support/getopt.h ++++ gawk-4.2.1/support/getopt.h +@@ -181,7 +181,7 @@ + # endif + # endif + #else /* not __GNU_LIBRARY__ */ +-extern int getopt (); ++extern int getopt (int, char *const *, const char *); + #endif /* __GNU_LIBRARY__ */ + + #ifndef __need_getopt