Skip to content

Commit 754b69f

Browse files
committed
Consider libutil as integral part of glibc
1 parent 55c99e9 commit 754b69f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -834,16 +834,16 @@ add_dependencies(${BOX64} WRAPPERS)
834834
#add_dependencies(${BOX64} PRINTER)
835835
#target_link_libraries(${BOX64} c m dl rt pthread resolv)
836836
if(STATICBUILD)
837-
set_target_properties(${BOX64} PROPERTIES LINK_FLAGS "-static -Wl,--no-as-needed -Wl,--whole-archive -Wl,--allow-multiple-definition -lm -ldl -lrt -lpthread -lresolv -lc -Wl,-defsym,_DYNAMIC=0 -pthread")
837+
set_target_properties(${BOX64} PROPERTIES LINK_FLAGS "-static -Wl,--no-as-needed -Wl,--whole-archive -Wl,--allow-multiple-definition -lm -ldl -lrt -lpthread -lresolv -lc -lutil -Wl,-defsym,_DYNAMIC=0 -pthread")
838838
else()
839839
if(ANDROID)
840840
if(TERMUX)
841-
target_link_libraries(${BOX64} c m dl android-sysv-semaphore)
841+
target_link_libraries(${BOX64} c m dl util android-sysv-semaphore)
842842
else()
843-
target_link_libraries(${BOX64} c m dl)
843+
target_link_libraries(${BOX64} c m dl util)
844844
endif()
845845
else()
846-
set_target_properties(${BOX64} PROPERTIES LINK_FLAGS "-Wl,--no-as-needed -lc -lm -ldl -lrt -lpthread -lresolv -Wl,--as-needed -pthread")
846+
set_target_properties(${BOX64} PROPERTIES LINK_FLAGS "-Wl,--no-as-needed -lc -lm -ldl -lrt -lpthread -lresolv -lutil -Wl,--as-needed -pthread")
847847
endif()
848848
endif()
849849
if(DYNAREC)

src/wrapped/wrappedutil.c

+5
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,10 @@ EXPORT pid_t my_forkpty(x64emu_t* emu, void* amaster, void* name, void* termp, v
3737
return 0;
3838
}
3939

40+
#define PRE_INIT\
41+
if(1) \
42+
lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); \
43+
else
44+
4045
#include "wrappedlib_init.h"
4146

0 commit comments

Comments
 (0)