diff --git a/headers/build/host/darwin/sys/stat.h b/headers/build/host/darwin/sys/stat.h index 1a43b1442f..04ca945f85 100644 --- a/headers/build/host/darwin/sys/stat.h +++ b/headers/build/host/darwin/sys/stat.h @@ -1,6 +1,7 @@ #ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT #define _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT + #include_next #include @@ -28,4 +29,4 @@ #endif -#endif /* _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT */ \ No newline at end of file +#endif /* _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT */ diff --git a/headers/build/host/freebsd/sys/stat.h b/headers/build/host/freebsd/sys/stat.h index 1c9d257a31..4276f92385 100644 --- a/headers/build/host/freebsd/sys/stat.h +++ b/headers/build/host/freebsd/sys/stat.h @@ -1,6 +1,7 @@ #ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT #define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT + #include_next #include diff --git a/src/build/libroot/fs_darwin.cpp b/src/build/libroot/fs_darwin.cpp index a5e823ac24..645de32ccf 100644 --- a/src/build/libroot/fs_darwin.cpp +++ b/src/build/libroot/fs_darwin.cpp @@ -1,8 +1,10 @@ /* - * Copyright 2011, John Scipione, jscipione@gmail.com. + * Copyright 2005-2011, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2012, John Scipione, jscipione@gmail.com. * Distributed under the terms of the MIT License. */ + #include "fs_darwin.h" #include @@ -51,6 +53,7 @@ get_path(int fd, const char* path, char** fullPath) return 0; } + int eaccess(const char* path, int accessMode) { @@ -126,7 +129,7 @@ faccessat(int fd, const char* path, int accessMode, int flag) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -172,7 +175,7 @@ fchmodat(int fd, const char* path, mode_t mode, int flag) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -220,7 +223,7 @@ fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -260,7 +263,7 @@ fstatat(int fd, const char *path, struct stat *st, int flag) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -293,7 +296,7 @@ mkdirat(int fd, const char *path, mode_t mode) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -325,7 +328,7 @@ mkfifoat(int fd, const char *path, mode_t mode) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -357,7 +360,7 @@ mknodat(int fd, const char *path, mode_t mode, dev_t dev) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -459,7 +462,7 @@ readlinkat(int fd, const char *path, char *buffer, size_t bufferSize) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -529,7 +532,7 @@ unlinkat(int fd, const char *path, int flag) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; @@ -643,7 +646,7 @@ futimesat(int fd, const char *path, const struct timeval times[2]) return -1; } - char *fullPath = (char *)malloc(MAXPATHLEN); + char* fullPath = (char *)malloc(MAXPATHLEN); if (fullPath == NULL) { // ran out of memory allocating dirpath errno = ENOMEM; diff --git a/src/build/libroot/fs_darwin.h b/src/build/libroot/fs_darwin.h index dbdd7c2e26..66c5726c9d 100644 --- a/src/build/libroot/fs_darwin.h +++ b/src/build/libroot/fs_darwin.h @@ -1,10 +1,12 @@ /* - * Copyright 2011, John Scipione, jscipione@gmail.com. + * Copyright 2005-2011, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2012, John Scipione, jscipione@gmail.com. * Distributed under the terms of the MIT License. */ #ifndef FS_DARWIN_H #define FS_DARWIN_H + /* * Magic value that specify the use of the current working directory * to determine the target of relative file paths in the openat() and @@ -38,4 +40,5 @@ int linkat(int oldFD, const char *oldPath, int newFD, const char *newPath, int futimesat(int fd, const char *path, const struct timeval times[2]); + #endif // FS_DARWIN_H