Ver Fonte

daemon_start: do not use getsockname() if it is not supported

Evgeny Grin (Karlson2k) há 1 ano atrás
pai
commit
97299737b6
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      src/mhd2/daemon_start.c

+ 6 - 0
src/mhd2/daemon_start.c

@@ -991,6 +991,7 @@ create_bind_listen_stream_socket (struct MHD_Daemon *restrict d,
 }
 
 
+#ifdef MHD_USE_GETSOCKNAME
 /**
  * Detect and set the type and port of the listening socket
  * @param d the daemon to use
@@ -1061,6 +1062,11 @@ detect_listen_type_and_port (struct MHD_Daemon *restrict d)
 }
 
 
+#else
+#  define detect_listen_type_and_port(d) ((void) d)
+#endif
+
+
 #ifdef MHD_USE_EPOLL
 
 /**