glib: use portable g_setenv()

We have a setenv() wrapper in os-win32.c that no one is actually using.
Drop it and change to g_setenv() uniformly.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1576074210-52834-7-git-send-email-pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-12-11 15:23:28 +01:00 committed by Thomas Huth
parent e858e04dd4
commit e468ffdc6d
8 changed files with 6 additions and 30 deletions

View file

@ -772,7 +772,7 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
* This is a bit hackish but saves us from bigger problem.
* Maybe it's a good idea to fix this in SDL instead.
*/
setenv("SDL_VIDEODRIVER", "x11", 0);
g_setenv("SDL_VIDEODRIVER", "x11", 0);
#endif
if (SDL_Init(SDL_INIT_VIDEO)) {