Fix the broken SO_REUSEADDR.
[cubemap] / cubemap.cpp
index d0a3ac4d62d5721e42bac1d0f7fed4cec5729b82..692d48baf1d9e507d36926aa10a7f35f7d8847b1 100644 (file)
@@ -35,7 +35,7 @@ int create_server_socket(int port)
                exit(1);
        }
 
-       int one;        
+       int one = 1;
        if (setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) == -1) {
                perror("setsockopt(SO_REUSEADDR)");
                exit(1);