mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibCore+Meta: Workaround some symbols not being exported on FreeBSD
On FreeBSD some symbols like `environ` or `__progname` are not exported anywhere and are filled in by the dynamic loader. `environ` is a special case because we make use of it explicitly so we need to mark it a weak symbol so the linker doesn't complain.
This commit is contained in:
parent
3056e54cd0
commit
2aa8c950ca
Notes:
github-actions[bot]
2025-07-15 19:46:35 +00:00
Author: https://github.com/cqundefine
Commit: 2aa8c950ca
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5244
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/clausecker
Reviewed-by: https://github.com/trflynn89
2 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,9 @@
|
|||
|
||||
#if defined(AK_OS_MACOS) || defined(AK_OS_IOS)
|
||||
# include <crt_externs.h>
|
||||
#elif defined(AK_OS_FREEBSD)
|
||||
// FIXME: Remove this once FreeBSD exports environ from libc
|
||||
extern "C" __attribute__((weak)) char** environ;
|
||||
#elif !defined(AK_OS_WINDOWS)
|
||||
extern "C" char** environ;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue