]> err.no Git - systemd/commitdiff
[PATCH] remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize()
authorgreg@kroah.com <greg@kroah.com>
Thu, 29 Jan 2004 02:53:12 +0000 (18:53 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:20 +0000 (21:13 -0700)
libsysfs/sysfs_dir.c

index a60410ed28a2e571af4a1509c3bffb28ca9c884a..ce01669754160dfa652e29f5e7dd6462cae845ae 100644 (file)
@@ -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");