chiark / gitweb /
[PATCH] fix up some duplicated function compiler warnings in libsysfs
[elogind.git] / libsysfs / sysfs_dir.c
index ff2edf461588458b68201051b5a709059b80b4fc..e983d0eff4e88af4ab82516e038d393c96f1585c 100644 (file)
@@ -266,7 +266,11 @@ int sysfs_read_attribute(struct sysfs_attribute *sysattr)
                        sysattr->path);
                return -1;
        }
+#ifdef __KLIBC__
+       pgsize = 0x4000;
+#else
        pgsize = getpagesize();
+#endif
        fbuf = (unsigned char *)calloc(1, pgsize+1);
        if (fbuf == NULL) {
                dprintf("calloc failed\n");