diff options
Diffstat (limited to 'klibc/klibc/getpagesize.c')
-rw-r--r-- | klibc/klibc/getpagesize.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/klibc/klibc/getpagesize.c b/klibc/klibc/getpagesize.c new file mode 100644 index 0000000000..2d975b1586 --- /dev/null +++ b/klibc/klibc/getpagesize.c @@ -0,0 +1,26 @@ +/* + * getpagesize.c + */ + +#include <sys/syscall.h> +#include <asm/page.h> + +/* Presumably there is a better way to do this... */ +#ifdef __ia64__ +# define __NR_getpagesize 1171 +#endif + +#ifdef __NR_getpagesize + +_syscall0(int,getpagesize); + +#else + +int getpagesize(void) +{ + return PAGE_SIZE; +} + +#endif + + |