8 #include <klibc/extern.h>
9 #include <klibc/compiler.h>
10 #include <sys/types.h>
11 #if defined(__mips__) && !defined(__mips64__)
12 # include <klibc/archfcntl.h>
14 #include <linux/fcntl.h>
16 /* This is ugly, but "struct flock" has actually been defined with
17 a long off_t, so it's really "struct flock64". It just happens
20 This happens to work on all 32-bit architectures except MIPS. */
24 # define F_GETLK F_GETLK64
29 # define F_SETLK F_SETLK64
34 # define F_SETLKW F_SETLKW64
37 /* This is defined here as well as in <unistd.h> since old-style code
38 would still include <fcntl.h> when using open(), and open() being
39 a varadic function changes its calling convention on some architectures. */
40 #ifndef _KLIBC_IN_OPEN_C
41 __extern int open(const char *, int, ...);
44 __extern int fcntl(int, int, ...);