Re: [PATCH] loggen: fix build vs. newer xfsprogs headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 May 2014 07:54:03 -0400
Jeff Layton <jlayton@xxxxxxxxxxxxxxx> wrote:

> commit cc085d770adb in xfsprogs removed some header files that are
> included by loggen.c. Add an autoconf test that checks to see whether
> xfs_log_format.h is present. If it is, include that instead of the
> deprecated headers and add an alias for XFS_TRANS_MAGIC since that
> value no longer exists.
> 
> W.ith this patch, xfstests builds on both f20 and rawhide (f21) boxes.
> 
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
> ---
>  configure.ac | 9 ++++++---
>  src/loggen.c | 7 +++++++
>  2 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 43e6029193a6..e4680544ac82 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -26,14 +26,17 @@ AC_HEADER_STDC
>  			sys/types.h		\
>  			strings.h		\
>  			err.h			\
> -			linux/falloc.h
> -    ])
> -    AC_CHECK_HEADERS([	sys/fs/xfs_fsops.h	\
> +			linux/falloc.h		\
> +			sys/fs/xfs_fsops.h	\
>  			sys/fs/xfs_itable.h	\
>  			xfs/platform_defs.h	\
>  			btrfs/ioctl.h		\
>      ])
>  
> +AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/platform_defs.h>
> +#include <xfs/xfs_types.h>
> +#include <xfs/xfs_fs.h>])
> +


Hmm now that I look closer, loggen.c just includes xfs/libxfs.h in
order to pull in all of the necessary includes. I guess we should do
that here instead of including these headers individually...

I'll respin and resend.

>  AC_PACKAGE_NEED_UUIDCOMPARE
>  
>  case $pkg_platform
> diff --git a/src/loggen.c b/src/loggen.c
> index 522c9178ee26..a3d99f8c915f 100644
> --- a/src/loggen.c
> +++ b/src/loggen.c
> @@ -25,9 +25,16 @@
>   *                                                  - dxm 29/09/00
>   */
>  
> +#include <config.h>
> +
>  #include <xfs/libxfs.h>
> +#ifdef HAVE_XFS_XFS_LOG_FORMAT_H
> +#include <xfs/xfs_log_format.h>
> +#define XFS_TRANS_MAGIC	XFS_TRANS_HEADER_MAGIC
> +#else /* HAVE_XFS_XFS_LOG_FORMAT_H */
>  #include <xfs/xfs_log.h>
>  #include <xfs/xfs_log_priv.h>
> +#endif /* HAVE_XFS_XFS_LOG_FORMAT_H */
>  
>  #ifndef ASSIGN_ANY_LSN_DISK
>  #define ASSIGN_ANY_LSN_DISK(lsn,cycle,block)  \


-- 
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux