From 2f0b5d3dd961939ceddfecb97d388ece8fdb10cc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 4 Jun 2021 14:44:13 +0200 Subject: simplify address handling --- pacredir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacredir.c b/pacredir.c index 82bba71..a3c01f4 100644 --- a/pacredir.c +++ b/pacredir.c @@ -785,7 +785,7 @@ int main(int argc, char ** argv) { /* prepare struct to make microhttpd listen on localhost only */ address.sin_family = AF_INET; address.sin_port = htons(PORT_PACREDIR); - inet_pton(AF_INET, "127.0.0.1", &address.sin_addr); + address.sin_addr.s_addr = htonl(0x7f000001); /* start http server */ if ((mhd = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TCP_FASTOPEN, PORT_PACREDIR, -- cgit v1.2.3-54-g00ecf