1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00
freebsd-ports/games/nethack36/files/patch-include-system.h
Ed Schouten f4af647e8b Don't let the Nethack ports declare srandom() themselves.
As the prototype of srandom() has changed, be sure to no longer declare
the prototype of this function ourselves. Instead, simply pull in the
<stdlib.h> header that declares this function.

Reported by:	antoine@
Reviewed by:	glewis@
Differential Revision:	https://reviews.freebsd.org/D7378
2016-07-31 09:41:12 +00:00

14 lines
493 B
C

--- include/system.h.orig 2015-12-07 08:26:01 UTC
+++ include/system.h
@@ -81,7 +81,9 @@ typedef long off_t;
#if !defined(__SC__) && !defined(LINUX)
E long NDECL(random);
#endif
-#if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) \
+# if defined(__FreeBSD__)
+#include <stdlib.h> /* srandom() differs between versions of FreeBSD. */
+#elif (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) \
|| defined(RANDOM)
E void FDECL(srandom, (unsigned int));
#else