]> granicus.if.org Git - strace/blobdiff - fetch_struct_stat.c
netlink: add a basic rtnetlink parser of neigh messages
[strace] / fetch_struct_stat.c
index 50d102841d1235d85e793c041317415d01d43f20..317d3812e68ec4e4c786e44cb943b8c5653ead44 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2016-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -65,8 +66,10 @@ typedef struct stat struct_stat;
 
 #ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
 # define TIME_NSEC(arg) zero_extend_signed_to_ull(arg)
+# define HAVE_NSEC true
 #else
 # define TIME_NSEC(arg) 0
+# define HAVE_NSEC false
 #endif
 
 MPERS_PRINTER_DECL(bool, fetch_struct_stat,
@@ -94,6 +97,7 @@ MPERS_PRINTER_DECL(bool, fetch_struct_stat,
        dst->atime_nsec = TIME_NSEC(buf.st_atime_nsec);
        dst->ctime_nsec = TIME_NSEC(buf.st_ctime_nsec);
        dst->mtime_nsec = TIME_NSEC(buf.st_mtime_nsec);
+       dst->has_nsec = HAVE_NSEC;
        return true;
 #else /* !HAVE_STRUCT_STAT */
        printaddr(addr);