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]
Message-Id: <1471890809-4383-44-git-send-email-mikko.rapeli@iki.fi>
Date:   Mon, 22 Aug 2016 20:33:00 +0200
From:   Mikko Rapeli <mikko.rapeli@....fi>
To:     linux-kernel@...r.kernel.org
Cc:     Mikko Rapeli <mikko.rapeli@....fi>,
        David Sterba <dsterba@...e.com>, Liu Bo <bo.li.liu@...cle.com>,
        Jeff Mahoney <jeffm@...e.com>, Josef Bacik <jbacik@...com>,
        Chris Mason <clm@...com>, Vinson Lee <vlee@...edesktop.org>,
        Anand Jain <anand.jain@...cle.com>,
        Hans van Kranenburg <hans.van.kranenburg@...dix.com>,
        Gabríel Arthúr Pétursson 
        <gabriel@...tem.is>
Subject: [PATCH v05 43/72] 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 ac5eacd..8865985 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.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ