btrfs-progs: ioctl: fix compilation if ioctl.h is included standalone
authorDavid Sterba <dsterba@suse.com>
Mon, 14 Nov 2016 15:43:15 +0000 (16:43 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 23 Nov 2016 09:49:33 +0000 (10:49 +0100)
Definition of NULL is missing if ioctl.h is included standalone or when
no other include pulls the definition.

Reported-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
ioctl.h

diff --git a/ioctl.h b/ioctl.h
index cdfb888..709e996 100644 (file)
--- a/ioctl.h
+++ b/ioctl.h
@@ -25,6 +25,7 @@ extern "C" {
 
 #include <asm/types.h>
 #include <linux/ioctl.h>
+#include <stddef.h>
 
 #ifndef __user
 #define __user