musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/internal/libc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/libc.c')
-rw-r--r--src/internal/libc.c 10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/internal/libc.c b/src/internal/libc.c
index 5e8e9d95..954efedf 100644
--- a/src/internal/libc.c
+++ b/src/internal/libc.c
@@ -1,3 +1,11 @@
#include "libc.h"
-struct libc libc;
+#ifdef __PIC__
+struct __libc *__libc_loc()
+{
+ static struct __libc __libc;
+ return &__libc;
+}
+#else
+struct __libc __libc;
+#endif
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月07日 00:49:10 +0000

AltStyle によって変換されたページ (->オリジナル) /