/*
* 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
#ifdef HAVE_STRUCT_STAT64_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_stat64,
- struct tcb *const tcp, const kernel_ureg_t addr,
+ struct tcb *const tcp, const kernel_ulong_t addr,
struct strace_stat *const dst)
{
#ifdef HAVE_STRUCT_STAT64
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_STAT64 */
printaddr(addr);