Use protected visibility for exported API functions
Protected visibility is like default visibility, in that functions will be "exported" from the library. However, it also guarantees that references to the functions from within the library will be to the library's version, even if the symbols are overriden by the application.
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
#else
|
||||
#if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
|
||||
#define AL_API __attribute__((visibility("default")))
|
||||
#define AL_API __attribute__((visibility("protected")))
|
||||
#else
|
||||
#define AL_API extern
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
#else
|
||||
#if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
|
||||
#define ALC_API __attribute__((visibility("default")))
|
||||
#define ALC_API __attribute__((visibility("protected")))
|
||||
#else
|
||||
#define ALC_API extern
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user