add handling for other linux distros
This commit is contained in:
@@ -16,7 +16,10 @@ target_link_libraries(db
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(db ws2_32)
|
target_link_libraries(db ws2_32)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(db pthread md)
|
target_link_libraries(db pthread)
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
target_link_libraries(db md)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ target_link_libraries(game
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(game ws2_32)
|
target_link_libraries(game ws2_32)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(game pthread md)
|
target_link_libraries(game pthread)
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
target_link_libraries(game md)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include "ClientPackageCryptInfo.h"
|
#include "ClientPackageCryptInfo.h"
|
||||||
#include "common/stl.h"
|
#include "common/stl.h"
|
||||||
|
|
||||||
#ifndef OS_FREEBSD
|
#ifdef OS_WINDOWS
|
||||||
#include "libthecore/xdirent.h"
|
#include "libthecore/xdirent.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -520,7 +520,9 @@ int start(int argc, char **argv)
|
|||||||
printf("IP %s\n", g_szPublicIP);
|
printf("IP %s\n", g_szPublicIP);
|
||||||
|
|
||||||
optind++;
|
optind++;
|
||||||
optreset = 1;
|
#ifdef OS_FREEBSD
|
||||||
|
optreset = 1;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': // port
|
case 'p': // port
|
||||||
@@ -535,7 +537,9 @@ int start(int argc, char **argv)
|
|||||||
printf("port %d\n", mother_port);
|
printf("port %d\n", mother_port);
|
||||||
|
|
||||||
optind++;
|
optind++;
|
||||||
optreset = 1;
|
#ifdef OS_FREEBSD
|
||||||
|
optreset = 1;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// LOCALE_SERVICE
|
// LOCALE_SERVICE
|
||||||
@@ -544,7 +548,9 @@ int start(int argc, char **argv)
|
|||||||
if (optind < argc)
|
if (optind < argc)
|
||||||
{
|
{
|
||||||
st_localeServiceName = argv[optind++];
|
st_localeServiceName = argv[optind++];
|
||||||
optreset = 1;
|
#ifdef OS_FREEBSD
|
||||||
|
optreset = 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef OS_WINDOWS
|
#ifndef __USE_SELECT__
|
||||||
|
|
||||||
typedef struct fdwatch FDWATCH;
|
typedef struct fdwatch FDWATCH;
|
||||||
typedef struct fdwatch * LPFDWATCH;
|
typedef struct fdwatch * LPFDWATCH;
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ int thecore_init(int fps, HEARTFUNC heartbeat_func)
|
|||||||
srand(time(0));
|
srand(time(0));
|
||||||
#else
|
#else
|
||||||
srandom(time(0) + getpid() + getuid());
|
srandom(time(0) + getpid() + getuid());
|
||||||
|
#ifdef OS_FREEBSD
|
||||||
srandomdev();
|
srandomdev();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
log_init();
|
log_init();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
void signal_setup() {}
|
void signal_setup() {}
|
||||||
void signal_timer_disable() {}
|
void signal_timer_disable() {}
|
||||||
void signal_timer_enable(int timeout_seconds) {}
|
void signal_timer_enable(int timeout_seconds) {}
|
||||||
#elif OS_FREEBSD
|
#else
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
RETSIGTYPE reap(int sig)
|
RETSIGTYPE reap(int sig)
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ target_link_libraries(qc
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(qc ws2_32)
|
target_link_libraries(qc ws2_32)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(qc pthread md)
|
target_link_libraries(qc pthread)
|
||||||
|
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
target_link_libraries(qc md)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ extern "C"
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user