From 04a84f262b6323f05c84470cfa6f02337aef8f0d Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 27 Jan 2020 23:18:52 +0900 Subject: Fix bug --- netcatchat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netcatchat.cpp b/netcatchat.cpp index 377aa51..c5cd48b 100644 --- a/netcatchat.cpp +++ b/netcatchat.cpp @@ -38,7 +38,7 @@ static int create_server_socket(void) { name.sin_family = AF_INET; name.sin_addr.s_addr = htonl(INADDR_ANY); name.sin_port = htons(PORT); - if (bind(sock, (struct sockaddr*)&name, sizeof name) < 0) die_perror("bind"); + if (::bind(sock, (struct sockaddr*)&name, sizeof name) < 0) die_perror("bind"); if (listen(sock, 16) < 0) die_perror("listen"); -- cgit v1.2.3-70-g09d2