From c77e51c08446240f0a18badad8994958bf7401e4 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 11 Sep 2024 07:41:12 -0700 Subject: [PATCH] Use SDL_unsetenv() --- src/misc/unix/SDL_sysurl.c | 4 ++-- src/video/wayland/SDL_waylandwindow.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/unix/SDL_sysurl.c b/src/misc/unix/SDL_sysurl.c index c194a2d17d..670a099b23 100644 --- a/src/misc/unix/SDL_sysurl.c +++ b/src/misc/unix/SDL_sysurl.c @@ -41,7 +41,7 @@ bool SDL_SYS_OpenURL(const char *url) pid_t pid2; const char *args[] = { "xdg-open", url, NULL }; // Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam - unsetenv("LD_PRELOAD"); + SDL_unsetenv("LD_PRELOAD"); if (posix_spawnp(&pid2, args[0], NULL, NULL, (char **)args, environ) == 0) { // Child process doesn't wait for possibly-blocking grandchild. _exit(EXIT_SUCCESS); @@ -51,7 +51,7 @@ bool SDL_SYS_OpenURL(const char *url) #else pid_t pid2; // Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam - unsetenv("LD_PRELOAD"); + SDL_unsetenv("LD_PRELOAD"); // Notice this is vfork and not fork! pid2 = vfork(); if (pid2 == 0) { // Grandchild process will try to launch the url diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 24ee3eefde..5a7e5b91e7 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -1926,7 +1926,7 @@ void Wayland_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window) data->surface); // Clear this variable, per the protocol's request - unsetenv("XDG_ACTIVATION_TOKEN"); + SDL_unsetenv("XDG_ACTIVATION_TOKEN"); } }