diff options
author | Jim Meyering <jim@meyering.net> | 2005-01-19 09:57:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-01-19 09:57:49 +0000 |
commit | af5592710cd738a051c70eec758c9827d6581dd4 (patch) | |
tree | 952db361a19684f020fb843027824b7e65e7b97b /lib | |
parent | b10a836fa0f27b5f2ef1491c3226681a97ea4072 (diff) | |
download | coreutils-af5592710cd738a051c70eec758c9827d6581dd4.tar.xz |
Include headers required for use of DIR and struct stat.
[AT_SYMLINK_NOFOLLOW]: Define.
(fdopendir, fstatat): Add prototypes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/openat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/openat.h b/lib/openat.h index 74f5508db..43aa70fb7 100644 --- a/lib/openat.h +++ b/lib/openat.h @@ -21,9 +21,20 @@ # include <fcntl.h> #endif +#include <sys/types.h> +#include <sys/stat.h> +#include <dirent.h> +#include <unistd.h> + #ifndef AT_FDCWD # define AT_FDCWD (-3041965) /* same value as Solaris 9 */ +enum +{ + /* FIXME: use same value Solaris uses */ + AT_SYMLINK_NOFOLLOW = 100 +}; + # ifdef __OPENAT_PREFIX # undef openat # define __OPENAT_CONCAT(x, y) x ## y @@ -31,5 +42,10 @@ # define __OPENAT_ID(y) __OPENAT_XCONCAT (__OPENAT_PREFIX, y) # define openat __OPENAT_ID (openat) int openat (int fd, char const *filename, int flags, /* mode_t mode */ ...); +# define fdopendir __OPENAT_ID (fdopendir) +DIR *fdopendir (int fd); +# define fstatat __OPENAT_ID (fstatat) +int fstatat (int fd, char const *filename, struct stat *st, int flag); # endif + #endif |