[git commit branch/0.9.33] ipc: eventually use stat64 in ftok()
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Thu Apr 26 20:37:17 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=210da3d58fe7a13b60e5a58e886617e9a275def0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33
PR 4201
ftok() always used 32bit stat
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
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 d855e3d..cec2438 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)
More information about the uClibc-cvs
mailing list