1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

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
This commit is contained in:
Ed Schouten 2016-07-31 09:41:12 +00:00
parent 746658fb44
commit f4af647e8b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419352
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
# endif
# if !defined(SUNOS4) || defined(RANDOM)
-E void FDECL(srandom, (unsigned int));
+E void FDECL(srandom, (unsigned long));
+#include <stdlib.h> /* srandom() differs between versions of FreeBSD. */
# else
# if !defined(bsdi) && !defined(__FreeBSD__)
E int FDECL(srandom, (unsigned int));

View File

@ -6,7 +6,7 @@
# endif
-# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM)
+# if defined(__FreeBSD__)
+E void FDECL(srandom, (unsigned long));
+#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

View File

@ -6,7 +6,7 @@
#endif
-#if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) \
+# if defined(__FreeBSD__)
+E void FDECL(srandom, (unsigned long));
+#include <stdlib.h> /* srandom() differs between versions of FreeBSD. */
+#elif (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) \
|| defined(RANDOM)
E void FDECL(srandom, (unsigned int));