Francis Galiegue
2010-Sep-04 10:16 UTC
[PATCH] btrfsck.c: #include <sys/stat.h> to avoid compile failures with glibc >= 2.12
Avoid these warnings during compile: ---- btrfsck.c: In function ‘maybe_free_inode_rec’: btrfsck.c:323: warning: implicit declaration of function ‘S_ISDIR’ btrfsck.c:328: warning: implicit declaration of function ‘S_ISREG’ btrfsck.c:328: warning: implicit declaration of function ‘S_ISLNK’ ---- leading to a link failure: ---- btrfsck.o: In function `maybe_free_inode_rec'': btrfsck.c:(.text+0x110e): undefined reference to `S_ISDIR'' btrfsck.c:(.text+0x113b): undefined reference to `S_ISREG'' btrfsck.c:(.text+0x11eb): undefined reference to `S_ISREG'' btrfsck.c:(.text+0x1252): undefined reference to `S_ISLNK'' btrfsck.c:(.text+0x1289): undefined reference to `S_ISLNK'' ---- --- btrfsck.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/btrfsck.c b/btrfsck.c index 73f1836..c1f47a1 100644 --- a/btrfsck.c +++ b/btrfsck.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> +#include <sys/stat.h> #include "kerncompat.h" #include "ctree.h" #include "disk-io.h" -- 1.7.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html