Browse Source

Use execv instead of execve, because environ symbol breaks compilation with -Wl,--no-undefined flag under FreeBSD via Waf.

pull/2/head
Night Owl 6 years ago
parent
commit
f36d1f5621
  1. 3
      engine/common/system.c

3
engine/common/system.c

@ -29,7 +29,6 @@ GNU General Public License for more details. @@ -29,7 +29,6 @@ GNU General Public License for more details.
#include <dlfcn.h>
#ifndef __ANDROID__
extern char **environ;
#include <pwd.h>
#endif
#endif
@ -299,7 +298,7 @@ void Sys_ShellExecute( const char *path, const char *parms, int shouldExit ) @@ -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 );
}

Loading…
Cancel
Save