Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net/inpcb tests: tweak broadcast_bind.c for NetBSD



details:   https://anonhg.NetBSD.org/src/rev/6df990b4d458
branches:  trunk
changeset: 372350:6df990b4d458
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Nov 17 08:42:06 2022 +0000

description:
tests: tweak broadcast_bind.c for NetBSD

diffstat:

 tests/net/inpcb/broadcast_bind.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 9788074ea819 -r 6df990b4d458 tests/net/inpcb/broadcast_bind.c
--- a/tests/net/inpcb/broadcast_bind.c  Thu Nov 17 08:41:16 2022 +0000
+++ b/tests/net/inpcb/broadcast_bind.c  Thu Nov 17 08:42:06 2022 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD: broadcast_bind.c,v 1.2 2022/11/17 08:42:06 ozaki-r Exp $ */
 /* $OpenBSD: broadcast_bind.c,v 1.2 2015/12/02 20:45:00 mpi Exp $ */
 
 /*
@@ -30,7 +31,7 @@
 #include <netinet/in.h>
 
 
-int
+static int
 test_bind(char *paddr, struct in_addr *addr, u_int16_t port, int type,
     int expected_errno)
 {
@@ -100,7 +101,11 @@
        rc = 0;
        rc |= test_bind(argv[1], &uc_addr, port, SOCK_STREAM, 0);
        rc |= test_bind(argv[2], &err_addr, port, SOCK_STREAM, EADDRNOTAVAIL);
+#ifdef __NetBSD__
+       rc |= test_bind(argv[3], &bc_addr, port, SOCK_STREAM, 0);
+#else
        rc |= test_bind(argv[3], &bc_addr, port, SOCK_STREAM, EADDRNOTAVAIL);
+#endif
 
        rc |= test_bind(argv[2], &err_addr, port, SOCK_STREAM, EADDRNOTAVAIL);
        rc |= test_bind(argv[3], &bc_addr, port, SOCK_DGRAM, 0);



Home | Main Index | Thread Index | Old Index