From 00f72094a1381200077f6cc7a40b3ab649fab11e Mon Sep 17 00:00:00 2001 From: John Scipione Date: Wed, 29 Feb 2012 20:30:47 -0500 Subject: [PATCH] Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD. It is stubbed out for now. --- headers/build/host/darwin/sys/stat.h | 3 --- src/build/libroot/fs.cpp | 10 ---------- src/build/libroot/fs_darwin.cpp | 7 +++++++ src/build/libroot/fs_darwin.h | 5 ++++- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/headers/build/host/darwin/sys/stat.h b/headers/build/host/darwin/sys/stat.h index 35538445cb..1a43b1442f 100644 --- a/headers/build/host/darwin/sys/stat.h +++ b/headers/build/host/darwin/sys/stat.h @@ -22,9 +22,6 @@ # ifndef _HAIKU_BUILD_NO_FUTIMENS # define _HAIKU_BUILD_NO_FUTIMENS 1 # endif -# ifndef _HAIKU_BUILD_NO_FUTIMESAT -# define _HAIKU_BUILD_NO_FUTIMESAT 1 -# endif # ifndef _HAIKU_BUILD_NO_UTIMENSAT # define _HAIKU_BUILD_NO_UTIMENSAT 1 # endif diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp index 0db65d45f3..13a0fdd4df 100644 --- a/src/build/libroot/fs.cpp +++ b/src/build/libroot/fs.cpp @@ -158,16 +158,6 @@ futimens(int fd, const struct timespec times[2]) #endif // _HAIKU_BUILD_NO_FUTIMENS -#ifdef _HAIKU_BUILD_NO_FUTIMESAT - -int -futimesat(int fd, const char *path, const struct timeval times[2]) { - FDFile file(fd); - return futimes(fd, times); -} - -#endif // _HAIKU_BUILD_NO_FUTIMESAT - #ifdef _HAIKU_BUILD_NO_UTIMENSAT struct FDPathFile { diff --git a/src/build/libroot/fs_darwin.cpp b/src/build/libroot/fs_darwin.cpp index c6c054010e..6888273071 100644 --- a/src/build/libroot/fs_darwin.cpp +++ b/src/build/libroot/fs_darwin.cpp @@ -97,3 +97,10 @@ linkat(int toFD, const char *toPath, int linkFD, const char *linkPath, int flag) { return 0; } + + +int +futimesat(int fd, const char *path, const struct timeval times[2]) +{ + return 0; +} diff --git a/src/build/libroot/fs_darwin.h b/src/build/libroot/fs_darwin.h index 0d9dbf950c..a6c731e0ce 100644 --- a/src/build/libroot/fs_darwin.h +++ b/src/build/libroot/fs_darwin.h @@ -26,6 +26,9 @@ int renameat(int fromFD, const char* from, int toFD, const char* to); ssize_t readlinkat(int fd, const char *path, char *buffer, size_t bufferSize); int symlinkat(const char *toPath, int fd, const char *symlinkPath); int unlinkat(int fd, const char *path, int flag); -int linkat(int toFD, const char *toPath, int linkFD, const char *linkPath, int flag); +int linkat(int toFD, const char *toPath, int linkFD, const char *linkPath, + int flag); + +int futimesat(int fd, const char *path, const struct timeval times[2]); #endif // FS_DARWIN_H