diff options
-rw-r--r-- | regress/netcat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/regress/netcat.c b/regress/netcat.c index 98a08b1ec..56bd09de5 100644 --- a/regress/netcat.c +++ b/regress/netcat.c | |||
@@ -738,7 +738,12 @@ local_listen(char *host, char *port, struct addrinfo hints) | |||
738 | #ifdef SO_REUSEPORT | 738 | #ifdef SO_REUSEPORT |
739 | ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); | 739 | ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); |
740 | if (ret == -1) | 740 | if (ret == -1) |
741 | err(1, "setsockopt"); | 741 | err(1, "setsockopt SO_REUSEPORT"); |
742 | #endif | ||
743 | #ifdef SO_REUSEADDR | ||
744 | ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x)); | ||
745 | if (ret == -1) | ||
746 | err(1, "setsockopt SO_REUSEADDR"); | ||
742 | #endif | 747 | #endif |
743 | set_common_sockopts(s); | 748 | set_common_sockopts(s); |
744 | 749 | ||