diff options
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/sysvipc/ftok.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/misc/sysvipc/ftok.c b/libc/misc/sysvipc/ftok.c index d855e3d28..cec243868 100644 --- a/libc/misc/sysvipc/ftok.c +++ b/libc/misc/sysvipc/ftok.c @@ -19,14 +19,18 @@ #include <sys/ipc.h> #include <sys/stat.h> - +#ifdef __UCLIBC_HAS_LFS__ +# include <_lfs_64.h> +#else +# define stat64 stat +#endif key_t ftok (const char *pathname, int proj_id) { - struct stat st; + struct stat64 st; key_t key; - if (stat(pathname, &st) < 0) + if (stat64(pathname, &st) < 0) return (key_t) -1; key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) |