Fix server build on FreeBSD
This commit is contained in:
parent
8df449100a
commit
8f9914bd94
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,8 +133,13 @@ def configure(env):
|
||||||
env.Append(CPPPATH=['#platform/server'])
|
env.Append(CPPPATH=['#platform/server'])
|
||||||
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
|
||||||
env.Append(LIBS=['pthread'])
|
env.Append(LIBS=['pthread'])
|
||||||
|
|
||||||
|
if (platform.system() == "Linux"):
|
||||||
env.Append(LIBS=['dl'])
|
env.Append(LIBS=['dl'])
|
||||||
|
|
||||||
|
if (platform.system().find("BSD") >= 0):
|
||||||
|
env.Append(LIBS=['execinfo'])
|
||||||
|
|
||||||
# Link those statically for portability
|
# Link those statically for portability
|
||||||
if env['use_static_cpp']:
|
if env['use_static_cpp']:
|
||||||
env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])
|
env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])
|
||||||
|
|
|
@ -28,4 +28,10 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
|
#include <stdlib.h>
|
||||||
|
#define PTHREAD_BSD_SET_NAME
|
||||||
|
#endif
|
||||||
|
|
|
@ -32,8 +32,9 @@
|
||||||
#define CRASH_HANDLER_ENABLED 1
|
#define CRASH_HANDLER_ENABLED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "crash_handler_x11.h"
|
||||||
#include "main/main.h"
|
#include "main/main.h"
|
||||||
#include "os_x11.h"
|
#include "os/os.h"
|
||||||
#include "project_settings.h"
|
#include "project_settings.h"
|
||||||
|
|
||||||
#ifdef CRASH_HANDLER_ENABLED
|
#ifdef CRASH_HANDLER_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue