Merge branch 'master' of git://localhost/acess2
[tpg/acess2.git] / AcessNative / ld-acess_src / syscalls.c
index 5c26870..26f6c44 100644 (file)
@@ -9,9 +9,14 @@
 #include <string.h>
 #include <stddef.h>
 #include <unistd.h>
+#include <spawn.h>     // posix_spawn
 #include "request.h"
 
+#if SYSCALL_TRACE
 #define DEBUG(str, x...)       Debug(str, x)
+#else
+#define DEBUG(...)     do{}while(0)
+#endif
 
 #define        MAX_FPS 16
 
@@ -331,3 +336,12 @@ int native_execve(const char *filename, const char *const argv[], const char *co
        perror("native_execve");
        return ret;
 }
+
+int native_spawn(const char *filename, const char *const argv[], const char *const envp[])
+{
+       int rv;
+       
+       rv = posix_spawn(NULL, filename, NULL, NULL, (void*)argv, (void*)envp);
+       
+       return rv;
+}

UCC git Repository :: git.ucc.asn.au