Whamcloud - gitweb
LU-533 Include posix-types.h in headers and distribution
authorChristopher J. Morrone <morrone2@llnl.gov>
Mon, 8 Aug 2011 12:30:44 +0000 (08:30 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 9 Aug 2011 14:35:27 +0000 (10:35 -0400)
Include libcfs/posix/posix-types.h in the main rpm, and
add #include statements in lustre_user.h and ll_fiemap.h.
This will allow user-space applications that include these
files to compile.

Change-Id: Ibe391bf28afe91b3914ca1eb07fe66e408b21b4a
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1138
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/posix/Makefile.am
lustre.spec.in
lustre/include/lustre/ll_fiemap.h
lustre/include/lustre/lustre_user.h

index feba1d5..ca5c0da 100644 (file)
@@ -1 +1,7 @@
+libcfsposixdir = $(includedir)/libcfs/posix
+
+if UTILS
+libcfsposix_HEADERS = posix-types.h
+endif
+
 EXTRA_DIST := libcfs.h posix-wordsize.h posix-types.h
index acb94fa..cd914af 100644 (file)
@@ -226,6 +226,7 @@ cat >lustre.files <<EOF
 %attr(-, root, root) %{_libdir}/libptlctl.a
 %attr(-, root, root) %{_libdir}/liblustreapi.a
 %attr(-, root, root) /usr/include/lustre
+%attr(-, root, root) /usr/include/libcfs
 
 %attr(-, root, root) %{_mandir}/man?/*
 
index 8e03ab6..ebfd585 100644 (file)
 
 #if !defined(HAVE_LINUX_FIEMAP_H) || !defined(__KERNEL__)
 
+#ifndef __KERNEL__
+#include <libcfs/posix/posix-types.h>
+#endif
+
 struct ll_fiemap_extent {
         __u64 fe_logical;  /* logical offset in bytes for the start of
                             * the extent from the beginning of the file */
index ccf703a..d0da8a8 100644 (file)
@@ -46,6 +46,9 @@
  * @{
  */
 
+#ifndef __KERNEL__
+#include <libcfs/posix/posix-types.h>
+#endif
 #include <lustre/ll_fiemap.h>
 #if defined(__linux__)
 #include <linux/lustre_user.h>