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:53:25 +0300
committerBryan Drewery <bryan@shatow.net>2015-04-21 19:55:29 +0300
commit9aa1c499b1214d7b3f1de48c6853553e4f69b7a3 (patch)
tree1c360a98630230e86177dba05fad371f6c7d5d19 /external
parent2cce912f62f5ae51c95fd548313a82422f3be2cf (diff)
sh: Fix compatibility with 8.4
Diffstat (limited to 'external')
-rw-r--r--external/sh/test.c4
-rw-r--r--external/update_sh.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/external/sh/test.c b/external/sh/test.c
index 446c0a93..0fcb4c1f 100644
--- a/external/sh/test.c
+++ b/external/sh/test.c
@@ -573,9 +573,9 @@ newerf (const char *f1, const char *f2)
if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0)
return 0;
- if (b1.st_mtim.tv_sec > b2.st_mtim.tv_sec)
+ if (b1.st_mtime > b2.st_mtime)
return 1;
- if (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec)
+ if (b1.st_mtime < b2.st_mtime)
return 0;
return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec);
diff --git a/external/update_sh.sh b/external/update_sh.sh
index 732856ca..a6cb9987 100644
--- a/external/update_sh.sh
+++ b/external/update_sh.sh
@@ -29,6 +29,10 @@ done | sort -u | tar -c -T - --exclude bltin -s ",.*/,,g" -f - | tar -C "${DESTD
cp -R "${SH_DIR}/bltin" "${DESTDIR_REAL}/bltin"
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"
+
git add -A "${DESTDIR}"
echo "sh_SOURCES= \\"
find "${DESTDIR}" -name '*.c'|sed -e 's,$, \\,'