Discussion:
[ofw] [PATCH 1/4] NULL undeclared on Fedora
Davis, Arlin R
2014-02-10 07:45:57 UTC
Permalink
Signed-off-by: Arlin Davis <***@intel.com>
---
dat/include/dat2/dat_platform_specific.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dat/include/dat2/dat_platform_specific.h b/dat/include/dat2/dat_platform_specific.h
index ba4cfbc..8d62bd0 100644
--- a/dat/include/dat2/dat_platform_specific.h
+++ b/dat/include/dat2/dat_platform_specific.h
@@ -147,6 +147,7 @@ typedef DAT_UINT64 DAT_PADDR;
#if defined(__KERNEL__)
#include <linux/types.h>
#else
+#include <stdio.h>
#include <sys/types.h>
#include <linux/stddef.h>
#endif /* defined(__KERNEL__) */
--
1.7.3
Davis, Arlin R
2014-02-10 19:14:10 UTC
Permalink
Post by Davis, Arlin R
--- a/dat/include/dat2/dat_platform_specific.h
+++ b/dat/include/dat2/dat_platform_specific.h
@@ -147,6 +147,7 @@ typedef DAT_UINT64 DAT_PADDR;
#if defined(__KERNEL__)
#include <linux/types.h>
#else
+#include <stdio.h>
You could use #include <stddef.h> if only NULL is needed
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html
There was an issue with Fedora where linux/stddef.h is empty. Looks like
I need to clean this up and use <stddef.h> instead of <linux/stddef.h>
for the non-kernel build.

Loading...