diff --git a/headers/posix/unistd.h b/headers/posix/unistd.h index a1e864b6d4..0b23f73167 100644 --- a/headers/posix/unistd.h +++ b/headers/posix/unistd.h @@ -115,6 +115,7 @@ extern int lchown(const char *path, uid_t owner, gid_t group); extern int mknod(const char *name, mode_t mode, dev_t dev); +extern int getpagesize(void); extern int getdtablesize(void); extern long sysconf(int name); extern long fpathconf(int fd, int name); diff --git a/src/bin/diffutils/config.h b/src/bin/diffutils/config.h index 6f10c2b83b..c8bcf8b7fd 100644 --- a/src/bin/diffutils/config.h +++ b/src/bin/diffutils/config.h @@ -36,8 +36,6 @@ # define DIR_TO_FD(Dir_p) -1 #endif -#define getpagesize() 4096 - /* Define if there is a member named d_ino in the struct describing directory headers. */ #define D_INO_IN_DIRENT 1 @@ -422,7 +420,7 @@ /* #undef HAVE_GETMNTINFO */ /* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ +#define HAVE_GETPAGESIZE 1 /* Define to 1 if you have the `getpass' function. */ /* #undef HAVE_GETPASS */ diff --git a/src/bin/gdb/libiberty/Jamfile b/src/bin/gdb/libiberty/Jamfile index c45fc6ab8d..57a02b9e53 100644 --- a/src/bin/gdb/libiberty/Jamfile +++ b/src/bin/gdb/libiberty/Jamfile @@ -58,7 +58,6 @@ StaticLibrary libiberty.a : # me, but some of those should be provided by Haiku. basename.c clock.c - getpagesize.c index.c insque.c mempcpy.c diff --git a/src/system/libroot/posix/unistd/Jamfile b/src/system/libroot/posix/unistd/Jamfile index b32db8acc3..fb5cca7a78 100644 --- a/src/system/libroot/posix/unistd/Jamfile +++ b/src/system/libroot/posix/unistd/Jamfile @@ -16,6 +16,7 @@ MergeObject posix_unistd.o : fcntl.c fork.c getlogin.c + getpagesize.c hostname.cpp ioctl.c link.c diff --git a/src/system/libroot/posix/unistd/getpagesize.c b/src/system/libroot/posix/unistd/getpagesize.c new file mode 100644 index 0000000000..5cc1bd7b13 --- /dev/null +++ b/src/system/libroot/posix/unistd/getpagesize.c @@ -0,0 +1,13 @@ +/* +** Copyright 2008, James Woodcock. All rights reserved. +** Distributed under the terms of the MIT License. +*/ + +#include +#include + +int +getpagesize(void) +{ + return B_PAGE_SIZE; +}