#define F_LINUX_SPECIFIC_BASE 1024
*/
-int open(const char *path, int flags, ...);
-int fcntl(int fd, int cmd, ...);
#endif
+int open(const char *path, int flags, ...) asm("open64");
+int fcntl(int fd, int cmd, ...);
+
#endif
#define MAP_FAILED ((void*)0)
-void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
+void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) asm("mmap64");
int munmap(void *start, size_t length);
#define munlock(addr, len) ((void)addr, (void)len, 0)
#define mlock(addr, len) ((void)addr, (void)len, 0)
--- /dev/null
+#ifndef _POSIX_SYS_STAT_H
+#define _POSIX_SYS_STAT_H
+
+#include_next <sys/stat.h>
+int fstat(int fd, struct stat *buf) asm("fstat64");
+
+#endif /* _POSIX_SYS_STAT_H */
files[fd].file.offset = 0;
return fd;
}
-#if defined(__x86_64__) || defined(__ia64__)
-__typeof__(open) open64 __attribute__((__alias__("open")));
-#endif
int isatty(int fd)
{
}
return files[fd].file.offset;
}
-#if defined(__x86_64__) || defined(__ia64__)
-__typeof__(lseek) lseek64 __attribute__((__alias__("lseek")));
-#endif
int fsync(int fd) {
switch (files[fd].type) {
return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, 0, 0);
} else ASSERT(0);
}
-#if defined(__x86_64__) || defined(__ia64__)
-__typeof__(mmap) mmap64 __attribute__((__alias__("mmap")));
-#endif
int munmap(void *start, size_t length)
{