summaryrefslogtreecommitdiff
path: root/quotaio_xfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'quotaio_xfs.c')
-rw-r--r--quotaio_xfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
index 2db1c0c..5abb2c2 100644
--- a/quotaio_xfs.c
+++ b/quotaio_xfs.c
@@ -45,8 +45,13 @@ report: xfs_report
static inline time_t xfs_kern2utildqblk_ts(const struct xfs_kern_dqblk *k,
__s32 timer, __s8 timer_hi)
{
+#if SIZEOF_TIME_T > 4
if (k->d_fieldmask & FS_DQ_BIGTIME)
return (__u32)timer | (__s64)timer_hi << 32;
+#else
+ if (k->d_fieldmask & FS_DQ_BIGTIME && timer_hi != 0)
+ errstr(_("Truncating kernel returned time stamp."));
+#endif
return timer;
}
@@ -54,10 +59,14 @@ static inline void xfs_util2kerndqblk_ts(const struct xfs_kern_dqblk *k,
__s32 *timer_lo, __s8 *timer_hi, time_t timer)
{
*timer_lo = timer;
+#if SIZEOF_TIME_T > 4
if (k->d_fieldmask & FS_DQ_BIGTIME)
*timer_hi = timer >> 32;
else
*timer_hi = 0;
+#else
+ *timer_hi = 0;
+#endif
}
static inline int want_bigtime(time_t timer)