diff mbox

[2/4] Fedora 18 - build-fixes.patch

Message ID 1358607385-21163-3-git-send-email-gene@czarc.net (mailing list archive)
State New, archived
Headers show

Commit Message

Gene Czarcinski Jan. 19, 2013, 2:56 p.m. UTC
---
 btrfsck.c | 2 ++
 mkfs.c    | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/btrfsck.c b/btrfsck.c
index a851008..6274ff7 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -22,7 +22,9 @@ 
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <sys/types.h>
 #include <sys/stat.h>
+#include <unistd.h>
 #include <getopt.h>
 #include "kerncompat.h"
 #include "ctree.h"
diff --git a/mkfs.c b/mkfs.c
index fbf8319..d123d5f 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1206,7 +1206,7 @@  int main(int ac, char **av)
 	u64 alloc_start = 0;
 	u64 metadata_profile = 0;
 	u64 data_profile = 0;
-	u32 leafsize = getpagesize();
+	u32 leafsize = sysconf(_SC_PAGESIZE);
 	u32 sectorsize = 4096;
 	u32 nodesize = leafsize;
 	u32 stripesize = 4096;
@@ -1282,7 +1282,7 @@  int main(int ac, char **av)
 				print_usage();
 		}
 	}
-	sectorsize = max(sectorsize, (u32)getpagesize());
+	sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
 	if (check_leaf_or_node_size(leafsize, sectorsize))
 		exit(1);
 	if (check_leaf_or_node_size(nodesize, sectorsize))