]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - btrfs-progs/patches/btrfs-progs-build-fixes.patch
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
[people/amarx/ipfire-3.x.git] / btrfs-progs / patches / btrfs-progs-build-fixes.patch
CommitLineData
c9b0b55d
MT
1diff --git a/btrfsck.c b/btrfsck.c
2index 63e44d1..1e040c4 100644
3--- a/btrfsck.c
4+++ b/btrfsck.c
5@@ -22,7 +22,9 @@
1a20b24d 6 #include <stdlib.h>
c9b0b55d 7 #include <unistd.h>
1a20b24d
MT
8 #include <fcntl.h>
9+#include <sys/types.h>
c9b0b55d 10 #include <sys/stat.h>
1a20b24d
MT
11+#include <unistd.h>
12 #include "kerncompat.h"
13 #include "ctree.h"
14 #include "disk-io.h"
c9b0b55d
MT
15diff --git a/mkfs.c b/mkfs.c
16index 2e99b95..638f4c2 100644
17--- a/mkfs.c
18+++ b/mkfs.c
19@@ -348,7 +348,7 @@ int main(int ac, char **av)
1a20b24d
MT
20 u64 alloc_start = 0;
21 u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP;
22 u64 data_profile = BTRFS_BLOCK_GROUP_RAID0;
23- u32 leafsize = getpagesize();
24+ u32 leafsize = sysconf(_SC_PAGESIZE);
25 u32 sectorsize = 4096;
26 u32 nodesize = leafsize;
27 u32 stripesize = 4096;
c9b0b55d 28@@ -405,7 +405,7 @@ int main(int ac, char **av)
1a20b24d
MT
29 print_usage();
30 }
31 }
32- sectorsize = max(sectorsize, (u32)getpagesize());
33+ sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
34 if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
35 fprintf(stderr, "Illegal leafsize %u\n", leafsize);
36 exit(1);