Commit 50455d76 authored by Youness Alaoui's avatar Youness Alaoui

Fix includes for win32 compilation

parent 25c8b837
......@@ -47,12 +47,15 @@
# include "config.h"
#endif
#include <unistd.h>
#include "tcp-turn.h"
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include "tcp-turn.h"
#ifndef G_OS_WIN32
#include <unistd.h>
#endif
typedef struct {
NiceUdpTurnSocketCompatibility compatibility;
......
......@@ -46,13 +46,18 @@
#endif
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include "udp-bsd.h"
#ifdef G_OS_WIN32
typedef unsigned long ssize_t;
#else
#include <unistd.h>
#endif
/*** NiceSocket ***/
static int sock_recv_err (int fd)
{
......
......@@ -45,7 +45,6 @@
# include "config.h"
#endif
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
......
......@@ -39,9 +39,14 @@
#ifndef _STUN_3489BIS_H
#define _STUN_3489BIS_H
#ifdef _WIN32
#include "win32_common.h"
#else
# include <stdint.h>
# include <sys/types.h>
# include <stdbool.h>
#endif
# include <sys/types.h>
/**
......
......@@ -35,9 +35,16 @@
#ifndef _STUN_AGENT_H
#define _STUN_AGENT_H
#ifdef _WIN32
#include "win32_common.h"
#else
#include <stdint.h>
#include <sys/types.h>
#include <stdbool.h>
#endif
#include <sys/types.h>
typedef struct stun_agent_t StunAgent;
......
......@@ -38,7 +38,13 @@
#ifndef _CRC32_H
#define _CRC32_H
#ifdef _WIN32
#include "win32_common.h"
#else
#include <stdint.h>
#endif
#include <stdlib.h>
typedef struct {
......
......@@ -36,9 +36,14 @@
#define _STUN_MESSAGE_H
#ifdef _WIN32
#include "win32_common.h"
#else
#include <stdint.h>
#include <sys/types.h>
#include <stdbool.h>
#endif
#include <sys/types.h>
#include "constants.h"
#ifdef _WIN32
......
......@@ -39,9 +39,13 @@
#ifdef _WIN32
#include <winsock2.h>
#include "win32_common.h"
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <stdbool.h>
#include <unistd.h>
#include <sys/time.h>
#endif
#include "bind.h"
......@@ -50,11 +54,8 @@
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
#include <fcntl.h>
#include "timer.h"
#include "trans.h"
......
......@@ -41,8 +41,13 @@
* @brief STUN binding discovery
*/
#ifdef _WIN32
#include "win32_common.h"
#else
# include <stdbool.h>
# include <stdint.h>
#endif
# include "stun/stunagent.h"
......
......@@ -37,14 +37,20 @@
# include <config.h>
#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <sys/time.h>
#include <unistd.h>
#endif
#include "timer.h"
#include <stdlib.h> /* div() */
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
/**
......
......@@ -41,8 +41,6 @@
#include <string.h>
#include <assert.h>
#include <sys/time.h>
#include <unistd.h>
#ifdef _WIN32
#define ENOENT -1
......@@ -58,6 +56,7 @@
#define close closesocket
#else
#include <errno.h>
#include <unistd.h>
#endif
......
......@@ -44,16 +44,15 @@
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include "win32_common.h"
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdint.h>
#include <stdbool.h>
#endif
#include <stdint.h>
#include <sys/types.h>
#include <stdbool.h>
typedef struct stun_trans_s
......
......@@ -49,9 +49,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
#include <sys/time.h>
#include <fcntl.h>
......
......@@ -40,9 +40,12 @@
* @file bind.h
* @brief STUN binding discovery
*/
#ifdef _WIN32
#include "win32_common.h"
#else
# include <stdbool.h>
# include <stdint.h>
#endif
# include "stun/stunagent.h"
......
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