common: Uniform ssize_t definition between MSVC and others

This commit is contained in:
Joni Räsänen 2022-09-15 08:52:46 +03:00
parent 4dba1d55d1
commit 47c126262c
6 changed files with 3 additions and 13 deletions

View File

@ -9,8 +9,11 @@
#include <sys/time.h>
#endif
// ssize_t definition for all systems
#if defined(_MSC_VER)
typedef SSIZE_T ssize_t;
#else
#include <sys/types.h>
#endif
#include <stdint.h>

View File

@ -16,7 +16,6 @@
#include <windows.h>
#else
#include <arpa/inet.h>
#include <sys/types.h>
#include <cassert>
#include <cstring>
#endif

View File

@ -11,10 +11,6 @@
#include <vector>
#include <mutex>
#if defined(_MSC_VER)
typedef SSIZE_T ssize_t;
#endif
// TODO: get these from socket?
const int MAX_MSG_COUNT = 5000;
const int MAX_QUEUED_MSGS = 10;

View File

@ -12,8 +12,6 @@
#include "rtcp_packets.hh"
#ifndef _WIN32
#include <sys/time.h>
#endif

View File

@ -5,11 +5,6 @@
#include <chrono>
#ifndef _WIN32
#include <sys/types.h>
#endif // !_WIN32
namespace uvgrtp {
namespace frame

View File

@ -20,7 +20,6 @@
#include <mswsock.h>
#include <inaddr.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#endif