aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJiufei Xue <jiufei.xue@linux.alibaba.com>2019-04-17 03:08:56 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commit8a792b034d4b315251fd842bb4c73a133aa1368f (patch)
tree1a82e2d640853b89fc988bc0c743eeb1949b3282 /configure
parent771b01eb76ff480fee984bd1d21727147cc3e702 (diff)
virtiofsd: support nanosecond resolution for file timestamp
Define HAVE_STRUCT_STAT_ST_ATIM to 1 if `st_atim' is member of `struct stat' which means support nanosecond resolution for the file timestamp fields. Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index d91eab4d65..6ab028dd0d 100755
--- a/configure
+++ b/configure
@@ -5197,6 +5197,19 @@ if compile_prog "" "" ; then
strchrnul=yes
fi
+#########################################
+# check if we have st_atim
+
+st_atim=no
+cat > $TMPC << EOF
+#include <sys/stat.h>
+#include <stddef.h>
+int main(void) { return offsetof(struct stat, st_atim); }
+EOF
+if compile_prog "" "" ; then
+ st_atim=yes
+fi
+
##########################################
# check if trace backend exists
@@ -6895,6 +6908,9 @@ fi
if test "$strchrnul" = "yes" ; then
echo "HAVE_STRCHRNUL=y" >> $config_host_mak
fi
+if test "$st_atim" = "yes" ; then
+ echo "HAVE_STRUCT_STAT_ST_ATIM=y" >> $config_host_mak
+fi
if test "$byteswap_h" = "yes" ; then
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
fi