diff options
Diffstat (limited to 'newlib/libc/sys/linux/ftok.c')
-rw-r--r-- | newlib/libc/sys/linux/ftok.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/newlib/libc/sys/linux/ftok.c b/newlib/libc/sys/linux/ftok.c index 497754bdb..2f4b684b5 100644 --- a/newlib/libc/sys/linux/ftok.c +++ b/newlib/libc/sys/linux/ftok.c @@ -23,15 +23,21 @@ #include <sys/ipc.h> #include <sys/stat.h> +#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2 +#define STAT stat64 +#else +#define STAT stat +#endif + key_t ftok (pathname, proj_id) const char *pathname; int proj_id; { - struct stat64 st; + struct STAT st; key_t key; - if (stat64 (pathname, &st) < 0) + if (STAT (pathname, &st) < 0) return (key_t) -1; key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) |