From d5dd2208d51f71bbe084af41d924d381fa1d6866 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 6 Oct 2012 23:25:52 +0800 Subject: [PATCH] AcessNative - Fixed windows symlink derps --- AcessNative/acesskernel_src/main.c | 13 +++++++++++++ AcessNative/acesskernel_src/server.c | 2 +- AcessNative/ld-acess_src/elf.c | 3 ++- AcessNative/ld-acess_src/elf32.h | 0 AcessNative/ld-acess_src/elf64.h | 0 AcessNative/ld-acess_src/syscalls.c | 2 +- 6 files changed, 17 insertions(+), 3 deletions(-) mode change 120000 => 100644 AcessNative/ld-acess_src/elf.c mode change 120000 => 100644 AcessNative/ld-acess_src/elf32.h mode change 120000 => 100644 AcessNative/ld-acess_src/elf64.h diff --git a/AcessNative/acesskernel_src/main.c b/AcessNative/acesskernel_src/main.c index e5d8baba..671fff96 100644 --- a/AcessNative/acesskernel_src/main.c +++ b/AcessNative/acesskernel_src/main.c @@ -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; diff --git a/AcessNative/acesskernel_src/server.c b/AcessNative/acesskernel_src/server.c index 79199798..48914670 100644 --- a/AcessNative/acesskernel_src/server.c +++ b/AcessNative/acesskernel_src/server.c @@ -19,7 +19,7 @@ typedef int socklen_t; # include # include # include -# include // inet_ntop +# include // getaddrinfo #endif #define DONT_INCLUDE_SYSCALL_NAMES #include "../syscalls.h" diff --git a/AcessNative/ld-acess_src/elf.c b/AcessNative/ld-acess_src/elf.c deleted file mode 120000 index 3c15fb9b..00000000 --- a/AcessNative/ld-acess_src/elf.c +++ /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" diff --git a/AcessNative/ld-acess_src/elf.c b/AcessNative/ld-acess_src/elf.c new file mode 100644 index 00000000..3e05f24a --- /dev/null +++ b/AcessNative/ld-acess_src/elf.c @@ -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" diff --git a/AcessNative/ld-acess_src/elf32.h b/AcessNative/ld-acess_src/elf32.h deleted file mode 120000 index dfecd714..00000000 --- a/AcessNative/ld-acess_src/elf32.h +++ /dev/null @@ -1 +0,0 @@ -#include "../../Usermode/Libraries/ld-acess.so_src/elf32.h" diff --git a/AcessNative/ld-acess_src/elf32.h b/AcessNative/ld-acess_src/elf32.h new file mode 100644 index 00000000..dfecd714 --- /dev/null +++ b/AcessNative/ld-acess_src/elf32.h @@ -0,0 +1 @@ +#include "../../Usermode/Libraries/ld-acess.so_src/elf32.h" diff --git a/AcessNative/ld-acess_src/elf64.h b/AcessNative/ld-acess_src/elf64.h deleted file mode 120000 index 6edb566a..00000000 --- a/AcessNative/ld-acess_src/elf64.h +++ /dev/null @@ -1 +0,0 @@ -#include "../../Usermode/Libraries/ld-acess.so_src/elf64.h" diff --git a/AcessNative/ld-acess_src/elf64.h b/AcessNative/ld-acess_src/elf64.h new file mode 100644 index 00000000..6edb566a --- /dev/null +++ b/AcessNative/ld-acess_src/elf64.h @@ -0,0 +1 @@ +#include "../../Usermode/Libraries/ld-acess.so_src/elf64.h" diff --git a/AcessNative/ld-acess_src/syscalls.c b/AcessNative/ld-acess_src/syscalls.c index 66801863..a5ec8dea 100644 --- a/AcessNative/ld-acess_src/syscalls.c +++ b/AcessNative/ld-acess_src/syscalls.c @@ -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; } -- 2.20.1