]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-bottom-half/sources/__wasilibc_initialize_environ.c
Use MUSL's `weak*` feature in bottom half (#306)
[wasi-libc.git] / libc-bottom-half / sources / __wasilibc_initialize_environ.c
index 4ec4d30a6fa71182c2030d1ded134b55e2239f5c..4a8bb1a3e824eeb78936e1bd8e260205aa1ab3d2 100644 (file)
@@ -11,7 +11,7 @@
 /// Statically-initialize it to an invalid pointer value so that we can
 /// detect if it's been explicitly initialized (we can't use `NULL` because
 /// `clearenv` sets it to NULL.
-char **__wasilibc_environ __attribute__((weak)) = (char **)-1;
+char **__wasilibc_environ weak = (char **)-1;
 
 // See the comments in libc-environ.h.
 void __wasilibc_ensure_environ(void) {
@@ -87,7 +87,7 @@ void __wasilibc_deinitialize_environ(void) {
 }
 
 // See the comments in libc-environ.h.
-__attribute__((weak))
+weak
 void __wasilibc_maybe_reinitialize_environ_eagerly(void) {
     // This version does nothing. It may be overridden by a version which does
     // something if `environ` is used.