This patch enables newer linux/btrfs.h in Kernel headers 3.11,
where NULL is not recognized as a define. It gets rid of the
following compiling error:

In file included from ioctls/btrfs-control.c:5:0:
/usr/include/linux/btrfs.h: In function ‘btrfs_err_str’:
/usr/include/linux/btrfs.h:486:11: error: ‘NULL’ undeclared (first use in this 
function)
    return NULL;
           ^

This is done by postponing the inclusion of btrf.h

Signed-off-by: Andi Shyti <[email protected]>
---
 ioctls/btrfs-control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ioctls/btrfs-control.c b/ioctls/btrfs-control.c
index 35e5389..8d1e2d9 100644
--- a/ioctls/btrfs-control.c
+++ b/ioctls/btrfs-control.c
@@ -2,11 +2,11 @@
 
 #ifdef USE_BTRFS
 
-#include <linux/btrfs.h>
-
 #include "trinity.h"
 #include "ioctls.h"
 
+#include <linux/btrfs.h>
+
 static const struct ioctl btrfs_control_ioctls[] = {
        IOCTL(BTRFS_IOC_SCAN_DEV),
        IOCTL(BTRFS_IOC_DEVICES_READY),
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to