summaryrefslogtreecommitdiff
path: root/networking/fakeidentd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/fakeidentd.c')
-rw-r--r--networking/fakeidentd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c
index 0e543e7..04138cc 100644
--- a/networking/fakeidentd.c
+++ b/networking/fakeidentd.c
@@ -77,17 +77,16 @@ static void inetbind(void)
int s, port;
struct sockaddr_in addr;
int len = sizeof(addr);
- int one = 1;
struct servent *se;
- if ((se = getservbyname("identd", "tcp")) == NULL)
- port = IDENT_PORT;
- else
+ se = getservbyname("identd", "tcp");
+ port = IDENT_PORT;
+ if (se)
port = se->s_port;
s = xsocket(AF_INET, SOCK_STREAM, 0);
- setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+ setsockopt_reuseaddr(s);
memset(&addr, 0, sizeof(addr));
addr.sin_addr.s_addr = inet_addr(bind_ip_address);