File musl-add-env-module.patch of Package nodejs-vscode-oniguruma

From 087b0ece8957bd8b483253a86006ec65bdde61c7 Mon Sep 17 00:00:00 2001
From: Sam Clegg <sbc@chromium.org>
Date: Thu, 12 Jan 2023 11:07:55 -0800
Subject: [PATCH] Add support for clearenv C library function (#18492)

Fixes: #18489
---
 test/core/test_env.c | 6 ++++++
 tools/system_libs.py | 7 +++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/system_libs.py b/tools/system_libs.py
index 02e057054680..9aa5035b826b 100644
--- a/tools/system_libs.py
+++ b/tools/system_libs.py
@@ -956,7 +956,7 @@ def get_files(self):
     # musl modules
     ignore = [
         'ipc', 'passwd', 'signal', 'sched', 'time', 'linux',
-        'aio', 'exit', 'legacy', 'mq', 'setjmp', 'env',
+        'aio', 'exit', 'legacy', 'mq', 'setjmp',
         'ldso', 'malloc'
     ]
 
@@ -973,6 +973,8 @@ def get_files(self):
         # 'process' exclusion
         'fork.c', 'vfork.c', 'posix_spawn.c', 'posix_spawnp.c', 'execve.c', 'waitid.c', 'system.c',
         '_Fork.c',
+        # 'env' exclusion
+        '__reset_tls.c', '__init_tls.c', '__libc_start_main.c', '__stack_chk_fail.c',
     ]
 
     ignore += LIBC_SOCKETS
@@ -1086,9 +1088,6 @@ def get_files(self):
     libc_files += files_in_path(
         path='system/lib/libc/musl/src/linux',
         filenames=['getdents.c', 'gettid.c', 'utimes.c'])
-    libc_files += files_in_path(
-        path='system/lib/libc/musl/src/env',
-        filenames=['__environ.c', 'getenv.c', 'putenv.c', 'setenv.c', 'unsetenv.c'])
 
     libc_files += files_in_path(
         path='system/lib/libc/musl/src/sched',
openSUSE Build Service is sponsored by