Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2015-04-21 19:59:53 +0300
committerBryan Drewery <bryan@shatow.net>2015-04-21 19:59:53 +0300
commitb50e28a750ede803fe1ffd6b1c9cca092c2ee92e (patch)
tree478c9d43e3f984f9eacde10e53093616fd914921 /external
parent9aa1c499b1214d7b3f1de48c6853553e4f69b7a3 (diff)
sh: Really fix compatibility with 8.4
Diffstat (limited to 'external')
-rw-r--r--external/sh/test.c6
-rw-r--r--external/update_sh.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/external/sh/test.c b/external/sh/test.c
index 0fcb4c1f..c92bb088 100644
--- a/external/sh/test.c
+++ b/external/sh/test.c
@@ -573,12 +573,12 @@ newerf (const char *f1, const char *f2)
if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0)
return 0;
- if (b1.st_mtime > b2.st_mtime)
+ if (b1.st_mtimespec.tv_sec > b2.st_mtimespec.tv_sec)
return 1;
- if (b1.st_mtime < b2.st_mtime)
+ if (b1.st_mtimespec.tv_sec < b2.st_mtimespec.tv_sec)
return 0;
- return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec);
+ return (b1.st_mtimespec.tv_nsec > b2.st_mtimespec.tv_nsec);
}
static int
diff --git a/external/update_sh.sh b/external/update_sh.sh
index a6cb9987..c2b55911 100644
--- a/external/update_sh.sh
+++ b/external/update_sh.sh
@@ -31,7 +31,7 @@ make clean cleandepend
cd "${ORIG_PWD}"
# Fix backwards compat for st_mtim
-sed -i '' -e 's,st_mtim\.tv_sec,st_mtime,g' "${DESTDIR}/test.c"
+sed -i '' -e 's,[[:<:]]st_mtim[[:>:]],st_mtimespec,g' "${DESTDIR}/test.c"
git add -A "${DESTDIR}"
echo "sh_SOURCES= \\"