1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

Make libportfwd crosscompilable from linux.

This commit is contained in:
Dominik Schmidt
2010-10-27 17:21:17 +02:00
parent c1ae02f459
commit b41205e2f7
3 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
#ifndef LIBPORTFWD_PORTFWD_H
#define LIBPORTFWD_PORTFWD_H true
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -34,3 +36,4 @@ class Portfwd
unsigned int m_upbps, m_downbps; unsigned int m_upbps, m_downbps;
}; };
#endif

View File

@@ -23,7 +23,9 @@
#define uint16_t unsigned short #define uint16_t unsigned short
#endif #endif
/* Hack */ /* Hack */
#include <winsock.h>
#define UNIX_PATH_LEN 108 #define UNIX_PATH_LEN 108
#include <stdint.h>
struct sockaddr_un { struct sockaddr_un {
uint16_t sun_family; uint16_t sun_family;
char sun_path[UNIX_PATH_LEN]; char sun_path[UNIX_PATH_LEN];

View File

@@ -28,7 +28,7 @@
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <io.h> #include <io.h>
#include <IPHlpApi.h> #include <iphlpapi.h>
#define snprintf _snprintf #define snprintf _snprintf
#if defined(_MSC_VER) && (_MSC_VER >= 1400) #if defined(_MSC_VER) && (_MSC_VER >= 1400)
#define strncasecmp _memicmp #define strncasecmp _memicmp