Skip to content

Commit 1910304

Browse files
committed
Squash-merge bugfix/linux-std-io
1 parent 9f62d13 commit 1910304

File tree

10 files changed

+11
-10
lines changed

10 files changed

+11
-10
lines changed

Server/core/CDynamicLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bool CDynamicLibrary::Load ( const char* szFilename )
8686
LocalFree ( lpMsgBuf );
8787
}
8888
#else
89-
m_hModule = dlopen ( szFilename, RTLD_NOW | RTLD_DEEPBIND );
89+
m_hModule = dlopen ( szFilename, RTLD_NOW );
9090

9191
// Output error if needed
9292
if ( !m_hModule )

Server/core/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ project "Core"
4747
links { "ncursesw", "breakpad", "rt" }
4848
buildoptions { "-pthread" }
4949
linkoptions { "-pthread" }
50-
50+
5151
filter "platforms:x64"
5252
targetdir(buildpath("server/x64"))

Server/launcher/CDynamicLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool CDynamicLibrary::Load ( const char* szFilename )
3939
#ifdef WIN32
4040
m_hModule = LoadLibrary ( szFilename );
4141
#else
42-
m_hModule = dlopen ( szFilename, RTLD_NOW | RTLD_DEEPBIND );
42+
m_hModule = dlopen ( szFilename, RTLD_NOW );
4343

4444
// Output error if needed
4545
if ( !m_hModule )

Server/launcher/premake5.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ project "Launcher"
2828

2929
filter "system:linux"
3030
links { "dl" }
31-
buildoptions { "-pthread" }
32-
linkoptions { "-pthread" }
31+
buildoptions { "-pthread", "-fvisibility=default" }
32+
linkoptions { "-pthread", "-rdynamic" }
3333

3434
filter {"system:linux", "platforms:x86"}
3535
targetname "mta-server"

Server/mods/deathmatch/logic/CDynamicLibrary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bool CDynamicLibrary::Load ( const char* szFilename )
4646
}
4747

4848
#else
49-
m_hModule = dlopen ( szFilename, RTLD_NOW | RTLD_DEEPBIND );
49+
m_hModule = dlopen ( szFilename, RTLD_NOW );
5050

5151
// Output error if needed
5252
if ( !m_hModule )

Server/mods/deathmatch/logic/lua/CLuaModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int CLuaModule::_LoadModule ( void )
7979
strError = SString( "%d", GetLastError() );
8080
SetCurrentDirectory( strSavedCurrentDirectory );
8181
#else
82-
m_hModule = dlopen ( m_szFileName, RTLD_NOW | RTLD_DEEPBIND );
82+
m_hModule = dlopen ( m_szFileName, RTLD_NOW );
8383
if ( m_hModule == NULL )
8484
strError = dlerror();
8585
#endif

Shared/publicsdk/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern "C"
2626
#ifdef WIN32
2727
#define MTAEXPORT extern "C" __declspec(dllexport)
2828
#else
29-
#define MTAEXPORT extern "C"
29+
#define MTAEXPORT extern "C" __attribute__ ((visibility ("default")))
3030
#endif
3131

3232
#include <list>

Shared/sdk/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ struct ElementID
7979
#ifdef WIN32
8080
#define _DECLSPEC_EX extern "C" _declspec(dllexport)
8181
#else
82-
#define _DECLSPEC_EX extern "C"
82+
#define _DECLSPEC_EX extern "C" __attribute__ ((visibility ("default")))
8383
#endif
8484

8585
// Maximum number of players that can be packed in a single lightweight puresync packet

premake5.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ workspace "MTASA"
100100

101101
filter "system:linux"
102102
vectorextensions "SSE2"
103+
buildoptions { "-fvisibility=hidden" }
103104

104105
-- Only build the client on Windows
105106
if os.target() == "windows" then

utils/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
# 32-bits
1111
if [ ! -d /compat/x86 ] && [[ $BUILD_BITS = "32" ]]; then
12-
apt-get install -y libmysqlclient-dev:i386
12+
apt-get update && apt-get install -y libmysqlclient-dev:i386
1313
mkdir -p /compat/x86
1414
objcopy --redefine-syms=/compat/glibc_version_x86.redef /usr/lib/gcc/x86_64-linux-gnu/5/32/libstdc++.a /compat/x86/libstdc++.a
1515
objcopy --redefine-syms=/compat/glibc_version_x86.redef /usr/lib/i386-linux-gnu/libmysqlclient.a /compat/x86/libmysqlclient.a

0 commit comments

Comments
 (0)