diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-04-17 22:05:07 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-04-17 22:05:07 +0200 |
commit | a2cc7378449b37ecc56d6f24ad54a00aada8cfb9 (patch) | |
tree | 97a9c24c766a314a173d2dd512281d1478987f48 /libc | |
parent | 2dab3f5ed31379c3673e2319bbbc7feb2e5c331e (diff) |
ipc: eventually use stat64 in ftok()
PR 4201
ftok() always used 32bit stat
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-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) |