Просмотр исходного кода

include sys/socket.h for socket() and SOCK_DGRAM

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Andrey Gursky 9 лет назад
Родитель
Сommit
8d6e941eda
2 измененных файлов с 5 добавлено и 0 удалено
  1. 2 0
      src/netbios_ns.c
  2. 3 0
      src/netbios_session.c

+ 2 - 0
src/netbios_ns.c

@@ -52,6 +52,8 @@
 #ifdef _WIN32
 #ifdef _WIN32
 # include <winsock2.h>
 # include <winsock2.h>
 # include <ws2tcpip.h>
 # include <ws2tcpip.h>
+#else
+# include <sys/socket.h>
 #endif
 #endif
 
 
 #include <bdsm/netbios_ns.h>
 #include <bdsm/netbios_ns.h>

+ 3 - 0
src/netbios_session.c

@@ -39,6 +39,9 @@
 #ifdef HAVE_ARPA_INET_H
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #include <arpa/inet.h>
 #endif
 #endif
+#ifndef _WIN32
+#include <sys/socket.h>
+#else
 
 
 #include "bdsm_debug.h"
 #include "bdsm_debug.h"
 #include "netbios_session.h"
 #include "netbios_session.h"