From a2cc7378449b37ecc56d6f24ad54a00aada8cfb9 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 17 Apr 2012 22:05:07 +0200 Subject: ipc: eventually use stat64 in ftok() PR 4201 ftok() always used 32bit stat Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/sysvipc/ftok.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libc/misc/sysvipc') 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 #include - +#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) -- cgit v1.2.3