AcessNative - Fixed windows symlink derps
authorJohn Hodge <[email protected]>
Sat, 6 Oct 2012 15:25:52 +0000 (23:25 +0800)
committerJohn Hodge <[email protected]>
Sat, 6 Oct 2012 15:25:52 +0000 (23:25 +0800)
AcessNative/acesskernel_src/main.c
AcessNative/acesskernel_src/server.c
AcessNative/ld-acess_src/elf.c [changed from symlink to file mode: 0644]
AcessNative/ld-acess_src/elf32.h [changed from symlink to file mode: 0644]
AcessNative/ld-acess_src/elf64.h [changed from symlink to file mode: 0644]
AcessNative/ld-acess_src/syscalls.c

index e5d8bab..671fff9 100644 (file)
@@ -38,6 +38,19 @@ extern int   giBuildNumber;
 const char     *gsAcessDir = "../Usermode/Output/x86_64";
 
 // === CODE ===
+#ifndef __WIN32__
+#define P_NOWAIT       0
+int spawnv(int flags, const char *execuable, char * const argv[])
+{
+       int pid = fork();
+       if( pid != 0 )  return pid;
+
+       execv(execuable, argv);
+       perror("spawnv - execve");
+       for(;;);
+}
+#endif
+
 int main(int argc, char *argv[])
 {
        char    **rootapp = NULL;
index 7919979..4891467 100644 (file)
@@ -19,7 +19,7 @@ typedef int   socklen_t;
 # include <unistd.h>
 # include <sys/socket.h>
 # include <netinet/in.h>
-# include <arpa/inet.h>        // inet_ntop
+# include <netdb.h>    // getaddrinfo
 #endif
 #define DONT_INCLUDE_SYSCALL_NAMES
 #include "../syscalls.h"
deleted file mode 120000 (symlink)
index 3c15fb9b4a17b41ff4533b068704d20f5d7f1f2b..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "common.h"
-#define _COMMON_H      // stops real ld-acess.so common.h being included
-#include "../../Usermode/Libraries/ld-acess.so_src/elf.c"
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..3e05f24a5d7b914d7d578cc85699a0abe2c39b4a
--- /dev/null
@@ -0,0 +1,4 @@
+#include "common.h"
+#define _COMMON_H
+// stops real ld-acess.so common.h being included
+#include "../../Usermode/Libraries/ld-acess.so_src/elf.c"
deleted file mode 120000 (symlink)
index dfecd7142298a3eb464973518ba26c4658f0b807..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../Usermode/Libraries/ld-acess.so_src/elf32.h"
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..dfecd7142298a3eb464973518ba26c4658f0b807
--- /dev/null
@@ -0,0 +1 @@
+#include "../../Usermode/Libraries/ld-acess.so_src/elf32.h"
deleted file mode 120000 (symlink)
index 6edb566a42e95eaddd3bc324be572db6481f58e9..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../Usermode/Libraries/ld-acess.so_src/elf64.h"
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..6edb566a42e95eaddd3bc324be572db6481f58e9
--- /dev/null
@@ -0,0 +1 @@
+#include "../../Usermode/Libraries/ld-acess.so_src/elf64.h"
index 6680186..a5ec8de 100644 (file)
@@ -321,7 +321,7 @@ uint64_t native_tell(int FD)
 int native_execve(const char *filename, const char *const argv[], const char *const envp[])
 {
        int ret;
-       ret = execve(filename, argv, envp);
+       ret = execve(filename, (void*)argv, (void*)envp);
        perror("native_execve");
        return ret;
 }

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