use macros instead of inline functions in shgetc.h
[oweals/musl.git] / src / internal / libc.c
index 5e8e9d95311f346013ce0c12c99f474fd98ea0ab..c1e21ca021a45ebe7f2736a4cba13d75e0c1613d 100644 (file)
@@ -1,3 +1,15 @@
 #include "libc.h"
 
-struct libc libc;
+#ifdef USE_LIBC_ACCESSOR
+struct __libc *__libc_loc()
+{
+       static struct __libc __libc;
+       return &__libc;
+}
+#else
+struct __libc __libc;
+#endif
+
+#ifdef BROKEN_VISIBILITY
+__asm__(".hidden __libc");
+#endif