lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Oct 2015 07:56:40 +0200
From:	Mikko Rapeli <mikko.rapeli@....fi>
To:	linux-kernel@...r.kernel.org
Cc:	mikko.rapeli@....fi, Chris Mason <clm@...com>,
	Takeuchi Satoru <takeuchi_satoru@...fujitsu.com>,
	David Sterba <dsterba@...e.cz>, Eryu Guan <guaneryu@...il.com>,
	linux-api@...r.kernel.org
Subject: [PATCH v4 62/79] include/uapi/linux/btrfs.h: define NULL

Copied the NULL definition from include/linux/stddef.h which does not have
it in userspace.

Fixes userspace compilation error:

error: ‘NULL’ undeclared (first use in this function)
    return NULL;

Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
---
 include/uapi/linux/btrfs.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index b6dec05..a8ae69b 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -20,6 +20,12 @@
 #define _UAPI_LINUX_BTRFS_H
 #include <linux/types.h>
 #include <linux/ioctl.h>
+#include <linux/stddef.h>
+
+/* for userspace where linux/stddef.h doesn't define this */
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
 
 #define BTRFS_IOCTL_MAGIC 0x94
 #define BTRFS_VOL_NAME_MAX 255
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ