1 |
commit: 2aacf8d5e4052441f9bb791051a30146bf65793e |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 4 23:15:15 2018 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 4 23:18:40 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aacf8d5 |
7 |
|
8 |
app-misc/screen: Fix building on musl libc, bug #639424 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/639424 |
11 |
Package-Manager: Portage-2.3.14, Repoman-2.3.6 |
12 |
|
13 |
app-misc/screen/files/screen-4.4.0-utmp-musl.patch | 62 ++++++++++++++++++++++ |
14 |
app-misc/screen/screen-4.4.0.ebuild | 3 +- |
15 |
2 files changed, 64 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/app-misc/screen/files/screen-4.4.0-utmp-musl.patch b/app-misc/screen/files/screen-4.4.0-utmp-musl.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..990c73042cd |
20 |
--- /dev/null |
21 |
+++ b/app-misc/screen/files/screen-4.4.0-utmp-musl.patch |
22 |
@@ -0,0 +1,62 @@ |
23 |
+From 74fdc8988b55633cd05f8625390cd3f6a8102003 Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@××××××.net> |
25 |
+Date: Sat, 13 Jun 2015 17:52:46 +0200 |
26 |
+Subject: [PATCH] change checks for utmp/utmpx in header |
27 |
+ |
28 |
+linuxes should've working utmpx, so this check was bit weird |
29 |
+commit 2b1bdf96 mentions some "linux workaround", but nothing specific |
30 |
+ |
31 |
+fixes build with musl libc |
32 |
+--- |
33 |
+ os.h | 7 ++++--- |
34 |
+ utmp.c | 4 ++-- |
35 |
+ 2 files changed, 6 insertions(+), 5 deletions(-) |
36 |
+ |
37 |
+diff --git a/os.h b/os.h |
38 |
+index 55de249..e827ac9 100644 |
39 |
+--- a/os.h |
40 |
++++ b/os.h |
41 |
+@@ -250,9 +250,11 @@ extern int errno; |
42 |
+ #endif |
43 |
+ |
44 |
+ #if defined(UTMPOK) || defined(BUGGYGETLOGIN) |
45 |
+-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) |
46 |
++# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) |
47 |
+ # include <utmpx.h> |
48 |
+-# define UTMPFILE UTMPX_FILE |
49 |
++# ifdef UTMPX_FILE /* GNU extension */ |
50 |
++# define UTMPFILE UTMPX_FILE |
51 |
++# endif |
52 |
+ # define utmp utmpx |
53 |
+ # define getutent getutxent |
54 |
+ # define getutid getutxid |
55 |
+@@ -260,7 +262,6 @@ extern int errno; |
56 |
+ # define pututline pututxline |
57 |
+ # define setutent setutxent |
58 |
+ # define endutent endutxent |
59 |
+-# define ut_time ut_xtime |
60 |
+ # else /* SVR4 */ |
61 |
+ # include <utmp.h> |
62 |
+ # endif /* SVR4 */ |
63 |
+diff --git a/utmp.c b/utmp.c |
64 |
+index fa8b87b..f5d7db8 100644 |
65 |
+--- a/utmp.c |
66 |
++++ b/utmp.c |
67 |
+@@ -631,7 +631,7 @@ int pid; |
68 |
+ /* must use temp variable because of NetBSD/sparc64, where |
69 |
+ * ut_xtime is long(64) but time_t is int(32) */ |
70 |
+ (void)time(&now); |
71 |
+- u->ut_time = now; |
72 |
++ u->ut_tv.tv_sec = now; |
73 |
+ } |
74 |
+ |
75 |
+ static slot_t |
76 |
+@@ -743,7 +743,7 @@ int pid; |
77 |
+ strncpy(u->ut_line, line, sizeof(u->ut_line)); |
78 |
+ strncpy(u->ut_name, user, sizeof(u->ut_name)); |
79 |
+ (void)time(&now); |
80 |
+- u->ut_time = now; |
81 |
++ u->ut_tv.tv_sec = now; |
82 |
+ } |
83 |
+ |
84 |
+ static slot_t |
85 |
|
86 |
diff --git a/app-misc/screen/screen-4.4.0.ebuild b/app-misc/screen/screen-4.4.0.ebuild |
87 |
index 0ee4276016c..0dfbfbc066c 100644 |
88 |
--- a/app-misc/screen/screen-4.4.0.ebuild |
89 |
+++ b/app-misc/screen/screen-4.4.0.ebuild |
90 |
@@ -1,4 +1,4 @@ |
91 |
-# Copyright 1999-2017 Gentoo Foundation |
92 |
+# Copyright 1999-2018 Gentoo Foundation |
93 |
# Distributed under the terms of the GNU General Public License v2 |
94 |
|
95 |
EAPI=5 |
96 |
@@ -26,6 +26,7 @@ DEPEND="${CDEPEND} |
97 |
# - Don't use utempter even if it is found on the system. |
98 |
PATCHES=( |
99 |
"${FILESDIR}"/${PN}-4.3.0-no-utempter.patch |
100 |
+ "${FILESDIR}"/${P}-utmp-musl.patch |
101 |
) |
102 |
|
103 |
pkg_setup() { |