mirror of
https://review.haiku-os.org/haiku
synced 2025-02-14 09:40:04 +01:00
This completes the final 1/3 of #8857. Changes again by nielx with style fixes by me. The one part that I couldn't figure out, and maybe Ingo can chime in here. If headers/build/host/darwin/sys/stat.h is surrounded in extern "C" { } guards then I get a link error complaining that the functions defined here are duplicate symbols, once in fs.o and once in function_remapper.o. For example: ld: duplicate symbol _futimens in generated/objects/darwin/x86_64/release/build/libroot/libroot_build_function_remapper.a(function_remapper.o) and generated/objects/darwin/x86_64/release/build/libroot/libroot_build.a(fs.o) for architecture x86_64 I'm not sure why that is.
35 lines
980 B
C
35 lines
980 B
C
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
|
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
|
|
|
#include_next <sys/stat.h>
|
|
#include <sys/cdefs.h>
|
|
|
|
#ifndef UTIME_NOW
|
|
# define UTIME_NOW (-1)
|
|
# define UTIME_OMIT (-2)
|
|
|
|
__BEGIN_DECLS
|
|
|
|
/* assume that futimens() and utimensat() aren't available */
|
|
int futimens(int fd, const struct timespec times[2]);
|
|
int utimensat(int fd, const char* path, const struct timespec times[2],
|
|
int flag);
|
|
|
|
__END_DECLS
|
|
|
|
# ifndef _HAIKU_BUILD_NO_FUTIMENS
|
|
# define _HAIKU_BUILD_NO_FUTIMENS 1
|
|
# endif
|
|
# ifndef _HAIKU_BUILD_NO_UTIMENSAT
|
|
# define _HAIKU_BUILD_NO_UTIMENSAT 1
|
|
# endif
|
|
#endif
|
|
|
|
int fchmodat(int fd, const char* path, mode_t mode, int flag);
|
|
int fstatat(int fd, const char *path, struct stat *st, int flag);
|
|
int mkdirat(int fd, const char *path, mode_t mode);
|
|
int mkfifoat(int fd, const char *path, mode_t mode);
|
|
int mknodat(int fd, const char *name, mode_t mode, dev_t dev);
|
|
|
|
#endif /* _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT */
|