From: greg@kroah.com Date: Thu, 29 Jan 2004 02:53:12 +0000 (-0800) Subject: [PATCH] remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize() X-Git-Tag: 016~16 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=bc59f0167a03be2d2e4cf8a680dda8444243c64f [PATCH] remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize() --- diff --git a/libsysfs/sysfs_dir.c b/libsysfs/sysfs_dir.c index a60410ed2..ce0166975 100644 --- a/libsysfs/sysfs_dir.c +++ b/libsysfs/sysfs_dir.c @@ -273,11 +273,8 @@ int sysfs_read_attribute(struct sysfs_attribute *sysattr) sysattr->path); return -1; } -#ifdef __KLIBC__ - pgsize = 0x1000; -#else - pgsize = sysconf(_SC_PAGESIZE); -#endif + + pgsize = getpagesize(); fbuf = (unsigned char *)calloc(1, pgsize+1); if (fbuf == NULL) { dprintf("calloc failed\n");