From c02a7b0dcb88d487a5eee5cda4031acd98461c52 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 2 Feb 2005 13:40:19 +0000 Subject: [PATCH] Fixed build of libbeadapter.so and libopenbeos.so. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11214 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/storage/LibBeAdapter.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/kits/storage/LibBeAdapter.cpp b/src/kits/storage/LibBeAdapter.cpp index bc26079494..7f0515acf4 100644 --- a/src/kits/storage/LibBeAdapter.cpp +++ b/src/kits/storage/LibBeAdapter.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -16,6 +17,8 @@ #include +mode_t __gUmask = S_IUMSK; + enum { FD_TYPE_UNKNOWN, FD_TYPE_DIR, @@ -176,8 +179,9 @@ get_path(int fd, const char *relPath, BPath &path) } // _kern_open +extern "C" int -_kern_open(int fd, const char *path, int omode) +_kern_open(int fd, const char *path, int omode, int permissions) { status_t error; BPath fullPath; @@ -191,7 +195,7 @@ _kern_open(int fd, const char *path, int omode) path = fullPath.Path(); } // open the file - int result = open(path, omode); + int result = open(path, omode, permissions); if (result < 0) return errno; return result; @@ -201,7 +205,8 @@ _kern_open(int fd, const char *path, int omode) // _kern_open_entry_ref extern "C" int -_kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode) +_kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode, + int permissions) { BPath fullPath; node_ref ref; @@ -216,7 +221,7 @@ _kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int omode) if (error != B_OK) return error; // open the file - int fd = open(fullPath.Path(), omode); + int fd = open(fullPath.Path(), omode, permissions); if (fd < 0) return errno; return fd;