loggen: fix build vs. newer xfsprogs headers
[xfstests-dev.git] / src / loggen.c
index 4b55667588e1bf10e51e3b1f05745cc238f5510c..a3d99f8c915fdf9b57a563d3f708226107dde3c5 100644 (file)
  *                                                  - 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)  \
@@ -134,7 +141,6 @@ loggen_unmount(int count)
     head->h_cycle = cpu_to_be32(param_cycle);
     head->h_version = cpu_to_be32(1);
     head->h_len = cpu_to_be32(20);
-    head->h_chksum = cpu_to_be32(0);
     head->h_prev_block = cpu_to_be32(-1);
     head->h_num_logops = cpu_to_be32(1);
     head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0);
@@ -202,7 +208,6 @@ loggen_empty(int count)
                                                     sizeof(xfs_trans_header_t)+
                                                     sizeof(xfs_buf_log_format_t)+
                                                     sizeof(int));
-    head->h_chksum         = cpu_to_be32(0);
     head->h_prev_block     = cpu_to_be32(-1);
     head->h_num_logops     = cpu_to_be32(5);
     head->h_cycle_data[0]  = cpu_to_be32(0xb0c0d0d0);