From f36d1f5621323d170657b001e8e85b8cf6279b87 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 5 Nov 2018 08:01:43 +0500 Subject: [PATCH] Use execv instead of execve, because environ symbol breaks compilation with -Wl,--no-undefined flag under FreeBSD via Waf. --- engine/common/system.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/common/system.c b/engine/common/system.c index 53812312..38196435 100644 --- a/engine/common/system.c +++ b/engine/common/system.c @@ -29,7 +29,6 @@ GNU General Public License for more details. #include #ifndef __ANDROID__ -extern char **environ; #include #endif #endif @@ -299,7 +298,7 @@ void Sys_ShellExecute( const char *path, const char *parms, int shouldExit ) pid_t id = fork( ); if( id == 0 ) { - execve( xdgOpen, (char **)argv, environ ); + execv( xdgOpen, (char **)argv ); fprintf( stderr, "error opening %s %s", xdgOpen, path ); _exit( 1 ); }