From 8b939281dbd01dcfcf6e3dd68d8462fca210f082 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 15 Dec 2025 19:40:05 +0000 Subject: [PATCH] Fix configure test that uses 'main()' instead of 'int main(void)'. Because of this the return type of random(3) is misdetected and the build later fails on ports-gcc because the the local random() stub clashes with the prototype from . Bump REVISION. --- net/ns/Makefile | 2 +- net/ns/patches/patch-configure_in | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 net/ns/patches/patch-configure_in diff --git a/net/ns/Makefile b/net/ns/Makefile index 9d47f841ffd..760fdb587bc 100644 --- a/net/ns/Makefile +++ b/net/ns/Makefile @@ -3,7 +3,7 @@ COMMENT= UCB/LBNL Network Simulator Version 2 V= 2.35 DISTNAME= ns-src-$V PKGNAME= ns-$V -REVISION = 7 +REVISION = 8 CATEGORIES= net MAINTAINER = Stuart Cassoff diff --git a/net/ns/patches/patch-configure_in b/net/ns/patches/patch-configure_in new file mode 100644 index 00000000000..d6870245de3 --- /dev/null +++ b/net/ns/patches/patch-configure_in @@ -0,0 +1,12 @@ +Index: configure.in +--- configure.in.orig ++++ configure.in +@@ -52,7 +52,7 @@ touch confdefs.h + AC_TRY_RUN([#include + #include "confdefs.h" + long random() { return 1; } +-main() { exit(0); } ++int main(void) { exit(0); } + ], + AC_MSG_RESULT(long) + AC_DEFINE(RANDOM_RETURN_TYPE,long)