From 637d99977c22c39134c5c6e38314682196941a1c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 14 Dec 2017 08:32:19 -0500 Subject: [PATCH] tools: Fixes following build syscall change. --- src/tools/fs_shell/fcntl.cpp | 1 + src/tools/fs_shell/stat.cpp | 11 ++++++----- src/tools/fs_shell/unistd.cpp | 6 +++++- src/tools/unzip/unix/unxcfg.h | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/tools/fs_shell/fcntl.cpp b/src/tools/fs_shell/fcntl.cpp index 4654f730b1..ab63c1a0ab 100644 --- a/src/tools/fs_shell/fcntl.cpp +++ b/src/tools/fs_shell/fcntl.cpp @@ -18,6 +18,7 @@ using namespace FSShell; #if (!defined(__BEOS__) && !defined(__HAIKU__)) // The _kern_open() defined in libroot_build.so. +# define _kern_open _kernbuild_open extern "C" int _kern_open(int fd, const char *path, int openMode, int perms); #endif diff --git a/src/tools/fs_shell/stat.cpp b/src/tools/fs_shell/stat.cpp index 120a8f43e2..8de69a675e 100644 --- a/src/tools/fs_shell/stat.cpp +++ b/src/tools/fs_shell/stat.cpp @@ -23,6 +23,7 @@ using FSShell::to_platform_mode; #if (!defined(__BEOS__) && !defined(__HAIKU__)) // The _kern_read_stat() defined in libroot_build.so. +# define _kern_read_stat _kernbuild_read_stat extern "C" status_t _kern_read_stat(int fd, const char *path, bool traverseLink, struct stat *st, size_t statSize); #endif @@ -47,7 +48,7 @@ FSShell::unrestricted_stat(const char *path, struct fssh_stat *fsshStat) #endif from_platform_stat(&st, fsshStat); - + return 0; } @@ -71,7 +72,7 @@ FSShell::unrestricted_fstat(int fd, struct fssh_stat *fsshStat) #endif from_platform_stat(&st, fsshStat); - + return 0; } @@ -95,7 +96,7 @@ FSShell::unrestricted_lstat(const char *path, struct fssh_stat *fsshStat) #endif from_platform_stat(&st, fsshStat); - + return 0; } @@ -125,7 +126,7 @@ fssh_fstat(int fd, struct fssh_stat *fsshStat) { if (FSShell::unrestricted_fstat(fd, fsshStat) < 0) return -1; - + FSShell::restricted_file_restrict_stat(fsshStat); return 0; @@ -137,7 +138,7 @@ fssh_lstat(const char *path, struct fssh_stat *fsshStat) { if (FSShell::unrestricted_lstat(path, fsshStat) < 0) return -1; - + FSShell::restricted_file_restrict_stat(fsshStat); return 0; diff --git a/src/tools/fs_shell/unistd.cpp b/src/tools/fs_shell/unistd.cpp index b07eaac61c..ec9b4f4959 100644 --- a/src/tools/fs_shell/unistd.cpp +++ b/src/tools/fs_shell/unistd.cpp @@ -43,7 +43,11 @@ #if (!defined(__BEOS__) && !defined(__HAIKU__)) -# include "syscalls.h" + // Defined in libroot_build.so. +# define _kern_dup _kernbuild_dup +# define _kern_close _kernbuild_close + extern "C" int _kern_dup(int fd); + extern "C" status_t _kern_close(int fd); #endif diff --git a/src/tools/unzip/unix/unxcfg.h b/src/tools/unzip/unix/unxcfg.h index 0e6135a109..69347ed261 100644 --- a/src/tools/unzip/unix/unxcfg.h +++ b/src/tools/unzip/unix/unxcfg.h @@ -30,6 +30,7 @@ # endif # define HAIKU_USE_KERN_OPEN 1 +# define _kern_open _kernbuild_open extern int _kern_open(int fd, const char *path, int openMode, int perms); #endif // !__BEOS__