Commit b4c907d3 authored by Youness Alaoui's avatar Youness Alaoui

correctly ifdef/else/endif the includes for winsock and sys/socket

parent 31b64266
......@@ -45,15 +45,18 @@
# include <config.h>
#endif
#include <glib.h>
#include <string.h>
#include <errno.h>
#include <sys/select.h>
#ifdef G_OS_WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <glib.h>
#endif
#include "debug.h"
......
......@@ -39,8 +39,13 @@
# include <config.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <netinet/in.h> /* htons() */
#endif
#include <string.h>
#include <stdlib.h>
......
......@@ -41,6 +41,13 @@
#include <stdbool.h>
#include "constants.h"
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <sys/socket.h>
#endif
typedef struct stun_message_t StunMessage;
/* Message classes */
......
......@@ -37,14 +37,16 @@
# include <config.h>
#endif
#include <sys/types.h>
#ifndef _WIN32
#include <sys/socket.h>
#include <netdb.h>
#include <sys/types.h>
#include "stun/stunagent.h"
#include "stun/usages/bind.h"
#include <unistd.h>
#include <getopt.h>
#include <netdb.h>
#include <errno.h>
#include <stdlib.h>
......
......@@ -37,8 +37,12 @@
# include <config.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include "bind.h"
#include "stun/stunagent.h"
......
......@@ -40,11 +40,24 @@
#include <string.h>
#include <assert.h>
#ifdef _WIN32
#include <winsock2.h>
#define ENOENT -1
#define EINVAL -2
#define ENOBUFS -3
#define EAFNOSUPPORT -4
#define EPROTO -5
#define EACCES -6
#define EINPROGRESS -7
#else
#include <sys/types.h>
#include <sys/socket.h>
#include "stunagent.h"
#include <errno.h>
#include <arpa/inet.h>
#include <errno.h>
#endif
#include "stunagent.h"
/** ICE connectivity checks **/
#include "ice.h"
......
......@@ -41,11 +41,24 @@
#include <string.h>
#include <assert.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <unistd.h>
#ifdef _WIN32
#define ENOENT -1
#define EINVAL -2
#define ENOBUFS -3
#define EAFNOSUPPORT -4
#define EPROTO -5
#define EACCES -6
#define EINPROGRESS -7
#define EAGAIN -8
#define ENOSYS -9
#else
#include <errno.h>
#include <netinet/in.h>
#endif
#ifdef HAVE_POLL
# include <poll.h>
#endif
......
......@@ -37,8 +37,12 @@
# include <config.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include "stun/stunagent.h"
#include "turn.h"
......
......@@ -41,10 +41,16 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef _WIN32
#define ENOENT -1
#define EINVAL -2
#define ENOBUFS -3
#define EAFNOSUPPORT -4
#else
#include <errno.h>
#endif
#include "utils.h"
/** Compares two socket addresses
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment