+2025-06-26 Niels Möller <nisse@lysator.liu.se>
+
+ Cherry-picked from branch nettle-3.10-fixes:
+ Minimal patch for compilers that require prototypes, e.g., gcc-15.
+ * getopt.c (getenv): Delete non-prototype declaration.
+ * getopt.h (getopt): Declare getopt with a prototype, also for
+ non-glibc systems.
+
2025-06-24 Niels Möller <nisse@lysator.liu.se>
* sha-example.c (main): Update to use sha256 rather than sha1, and
static struct _getopt_data getopt_data;
-\f
-#ifndef __GNU_LIBRARY__
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-#endif /* not __GNU_LIBRARY__ */
\f
#ifdef _LIBC
/* Stored original parameters.
# endif
# endif
#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
#endif /* __GNU_LIBRARY__ */
#ifndef __need_getopt