[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch enables newer linux/btrfs.h in Kernel headers 3.11,
where NULL is not recognized as a define. This is done by
including  stdlib.h before linux/btrfs.h. 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
    return NULL;
           ^

Signed-off-by: Andi Shyti <andi@xxxxxxxxxxx>
---
 ioctls/btrfs-control.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ioctls/btrfs-control.c b/ioctls/btrfs-control.c
index 35e5389..3b0b50a 100644
--- a/ioctls/btrfs-control.c
+++ b/ioctls/btrfs-control.c
@@ -2,6 +2,7 @@
 
 #ifdef USE_BTRFS
 
+#include <stdlib.h>
 #include <linux/btrfs.h>
 
 #include "trinity.h"
-- 
1.8.3.2

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




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux