libs/wine/config.c: use execve on FreeBSD

Tijl Coosemans tijl at ulyssis.org
Tue Aug 8 08:58:54 CDT 2006


* use execve on FreeBSD


Index: libs/wine/config.c
===================================================================
RCS file: /home/wine/wine/libs/wine/config.c,v
retrieving revision 1.27
diff -u -r1.27 config.c
--- libs/wine/config.c	19 Jun 2006 21:19:24 -0000	1.27
+++ libs/wine/config.c	8 Aug 2006 13:57:15 -0000
@@ -35,6 +35,8 @@
 #endif
 #include "wine/library.h"
 
+extern char **environ;
+
 static const char server_config_dir[] = "/.wine";        /* config dir relative to $HOME */
 static const char server_root_prefix[] = "/tmp/.wine-";  /* prefix for server root dir */
 static const char server_dir_prefix[] = "/server-";      /* prefix for server dir */
@@ -432,7 +434,10 @@
         return;
     }
 #endif
-    execv( argv[0], argv );
+    /* FreeBSD's execv calls _execve, which exists outside libc as part
+       of the threading libs, so it can be confused with msvcrt's _execve.
+       We call execve instead to work around this.  */
+    execve( argv[0], argv, environ );
 }
 
 /* exec a wine internal binary (either the wine loader or the wine server) */



More information about the wine-patches mailing list