libpackage_build: undefined weak symbols are unsupported
... also for gcc 4 (#8288), so we have to use the dlopen() method always when building on Haiku. Fixes the build on gcc 4 Haiku.
This commit is contained in:
parent
ef6f476892
commit
6eb7e259e9
@ -38,7 +38,7 @@
|
|||||||
// abort()s. Obviously that isn't good behavior for a library.
|
// abort()s. Obviously that isn't good behavior for a library.
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
#ifdef __HAIKU__
|
||||||
|
|
||||||
|
|
||||||
BSolver*
|
BSolver*
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
typedef BPackageKit::BSolver* CreateSolverFunction();
|
typedef BPackageKit::BSolver* CreateSolverFunction();
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAIKU_TARGET_PLATFORM_HAIKU) || __GNUC__ == 2
|
#ifdef __HAIKU__
|
||||||
|
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
@ -28,7 +28,7 @@ static pthread_once_t sLoadLibsolvSolverAddOnInitOnce = PTHREAD_ONCE_INIT;
|
|||||||
static void
|
static void
|
||||||
load_libsolv_solver_add_on()
|
load_libsolv_solver_add_on()
|
||||||
{
|
{
|
||||||
#if defined(HAIKU_TARGET_PLATFORM_HAIKU) || __GNUC__ == 2
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
void* imageHandle = dlopen("libpackage-add-on-libsolv.so", 0);
|
void* imageHandle = dlopen("libpackage-add-on-libsolv.so", 0);
|
||||||
#else
|
#else
|
||||||
void* imageHandle = dlopen("libpackage-add-on-libsolv_build.so", 0);
|
void* imageHandle = dlopen("libpackage-add-on-libsolv_build.so", 0);
|
||||||
@ -68,7 +68,7 @@ BSolver::~BSolver()
|
|||||||
/*static*/ status_t
|
/*static*/ status_t
|
||||||
BSolver::Create(BSolver*& _solver)
|
BSolver::Create(BSolver*& _solver)
|
||||||
{
|
{
|
||||||
#if defined(HAIKU_TARGET_PLATFORM_HAIKU) || __GNUC__ == 2
|
#ifdef __HAIKU__
|
||||||
pthread_once(&sLoadLibsolvSolverAddOnInitOnce, &load_libsolv_solver_add_on);
|
pthread_once(&sLoadLibsolvSolverAddOnInitOnce, &load_libsolv_solver_add_on);
|
||||||
#endif
|
#endif
|
||||||
if (sCreateSolver == NULL)
|
if (sCreateSolver == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user