Browse Source

[core] use high precision stat timestamp on OS X

personal/stbuehler/ci-build
Glenn Strauss 2 years ago
parent
commit
42942ec97c
  1. 4
      src/etag.c

4
src/etag.c

@ -161,8 +161,12 @@ int etag_create(buffer *etag, const struct stat *st, etag_flags_t flags) {
if (flags & ETAG_USE_MTIME) {
buffer_append_int(etag, st->st_mtime);
#ifdef st_mtime /* use high-precision timestamp if available */
#if defined(__APPLE__) && defined(__MACH__)
buffer_append_int(etag, st->st_mtimespec.tv_nsec);
#else
buffer_append_int(etag, st->st_mtim.tv_nsec);
#endif
#endif
}
return 0;

Loading…
Cancel
Save