summaryrefslogtreecommitdiff
path: root/networking/inetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/inetd.c')
-rw-r--r--networking/inetd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 75b2b14..ec7b2e8 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -419,7 +419,6 @@ static int bump_nofile (void)
static void setup(servtab_t *sep)
{
- int on = 1;
int r;
sep->se_fd = socket(sep->se_family, sep->se_socktype, 0);
@@ -427,11 +426,8 @@ static void setup(servtab_t *sep)
bb_perror_msg("%s/%s: socket", sep->se_service, sep->se_proto);
return;
}
-#define turnon(fd, opt) \
-setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof(on))
- if (turnon(sep->se_fd, SO_REUSEADDR) < 0)
+ if (setsockopt_reuseaddr(sep->se_fd) < 0)
bb_perror_msg("setsockopt(SO_REUSEADDR)");
-#undef turnon
#ifdef CONFIG_FEATURE_INETD_RPC
if (isrpcservice(sep)) {