Message ID | 54347E5A035A054EAE9D05927FB467F972DEC731@ORSMSX101.amr.corp.intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Hi, Le lundi 10 février 2014 à 07:45 +0000, Davis, Arlin R a écrit : > Signed-off-by: Arlin Davis <arlin.r.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> You could use #include <stddef.h> if only NULL is needed http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html > #include <sys/types.h> > #include <linux/stddef.h> > #endif /* defined(__KERNEL__) */ Regards.
> > --- 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. Thanks.
Hi, Le lundi 10 février 2014 à 19:14 +0000, Davis, Arlin R a écrit : > > > --- 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. > In the kernel sources include/uapi/linux/stddef.h has only one line : #include <linux/compiler.h>. And <linux/compiler.h> is in include/linux/compiler.h thus not made available to userspace: it's removed as part of header sanitise process in make headers_install (see scripts/headers_install.sh). I believe empty linux/stddef.h is kept for userspace compatibility: http://codesearch.debian.net/search?q=%23include+%3Clinux%2Fstddef.h%3E Newer userspace code should probably not use it anymore. Regards.
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__) */
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com> --- dat/include/dat2/dat_platform_specific.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.7.3