X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-compat-util.h;h=19062534a1d8c8e46e77045cb9e67f437f619133;hb=a9bfe813094cf2c8ea0e30c3196070c868fb294c;hp=878d83dd0863570042af80919899b4d6aa57e35b;hpb=8a396c02fdc7efa787be20074ae08059e3f80d14;p=git.git diff --git a/git-compat-util.h b/git-compat-util.h index 878d83dd0..19062534a 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -388,4 +388,18 @@ void git_qsort(void *base, size_t nmemb, size_t size, # define FORCE_DIR_SET_GID 0 #endif +#ifdef NO_NSEC +#undef USE_NSEC +#define ST_CTIME_NSEC(st) 0 +#define ST_MTIME_NSEC(st) 0 +#else +#ifdef USE_ST_TIMESPEC +#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctimespec.tv_nsec)) +#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtimespec.tv_nsec)) +#else +#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctim.tv_nsec)) +#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec)) +#endif +#endif + #endif