summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <stha09@googlemail.com>2020-03-26 10:21:53 +0100
committerDavid Seifert <soap@gentoo.org>2020-03-26 10:21:53 +0100
commitfc98ef6d53fe28b690ca2b67d96cde766d1432c6 (patch)
treeadd678ef2ac56b271926a103a2211b1396e48e9b /sys-apps/heirloom-tools/files
parentdev-lang/php: ppc64 stable wrt bug #713484 (diff)
downloadgentoo-fc98ef6d53fe28b690ca2b67d96cde766d1432c6.tar.gz
gentoo-fc98ef6d53fe28b690ca2b67d96cde766d1432c6.tar.bz2
gentoo-fc98ef6d53fe28b690ca2b67d96cde766d1432c6.zip
sys-apps/heirloom-tools: fix build with glibc 2.31
Closes: https://bugs.gentoo.org/709410 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Stephan Hartmann <stha09@googlemail.com> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-apps/heirloom-tools/files')
-rw-r--r--sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch
new file mode 100644
index 000000000000..5186aa1cc2e1
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch
@@ -0,0 +1,41 @@
+--- a/date/date.c
++++ b/date/date.c
+@@ -134,26 +134,13 @@ badtime:
+ return (time_t)-1;
+ }
+
+-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || \
+- defined (__DragonFly__) || defined (__APPLE__)
+-static int
+-stime(time_t *t)
+-{
+- struct timeval tv;
+-
+- tv.tv_sec = *t;
+- tv.tv_usec = 0;
+-
+- return settimeofday(&tv, NULL);
+-}
+-#endif /* __FreeBSD__, __NetBSD__, __OpenBSD__, __DragonFly__, __APPLE__ */
+-
+ static void
+ settime(char *op)
+ {
+ struct utmpx before, after;
+ const char wtmpxfile[] = "/var/log/wtmp";
+ time_t newtime;
++ struct timeval tv;
+
+ memset(&before, 0, sizeof before);
+ memset(&after, 0, sizeof after);
+@@ -164,7 +151,9 @@ settime(char *op)
+ if ((newtime = timeop(op)) == (time_t)-1)
+ badconv();
+ gettimeofday(&before.ut_tv, NULL);
+- if (stime(&newtime) < 0) {
++ tv.tv_sec = newtime;
++ tv.tv_usec = 0;
++ if (settimeofday(&tv, NULL) < 0) {
+ fprintf(stderr, "%s: no permission\n", progname);
+ exit(1);
+ }