summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2020-12-22 16:42:39 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-12-22 16:42:58 +0200
commite03739738c852415ce57e1d996f6e915b3272d82 (patch)
tree28057a56c7b058ea59aaf9e4f9038748fb66ae8a /sys-apps
parentdev-lang/lua: slots: set self as default Lua implementation if there isn't on... (diff)
downloadgentoo-e03739738c852415ce57e1d996f6e915b3272d82.tar.gz
gentoo-e03739738c852415ce57e1d996f6e915b3272d82.tar.bz2
gentoo-e03739738c852415ce57e1d996f6e915b3272d82.zip
sys-apps/util-linux: Fix build on riscv32
Patch is backport from upstream master Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/files/util-linux-2.36.1-riscv32.patch29
-rw-r--r--sys-apps/util-linux/util-linux-2.36.1-r1.ebuild1
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.36.1-riscv32.patch b/sys-apps/util-linux/files/util-linux-2.36.1-riscv32.patch
new file mode 100644
index 000000000000..b18a01906ebf
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.36.1-riscv32.patch
@@ -0,0 +1,29 @@
+From 367972fae13d170675768d63678577cae1890143 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Tue, 17 Nov 2020 11:32:45 +0100
+Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32
+
+Check that __NR_settimeofday_time32 exists before trying to use it as
+syscall number.
+
+Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
+---
+ sys-utils/hwclock.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
+index 1f7ef3317..db448687d 100644
+--- a/sys-utils/hwclock.c
++++ b/sys-utils/hwclock.c
+@@ -678,7 +678,7 @@ display_time(struct timeval hwctime)
+ #ifndef SYS_settimeofday
+ # ifdef __NR_settimeofday
+ # define SYS_settimeofday __NR_settimeofday
+-# else
++# elif defined(__NR_settimeofday_time32)
+ # define SYS_settimeofday __NR_settimeofday_time32
+ # endif
+ #endif
+--
+2.26.2
+
diff --git a/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
index f7acbfdb1510..8008e211b8d7 100644
--- a/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
@@ -77,6 +77,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/${P}-libmount_dont_use_symfollow.patch" #755878
+ "${FILESDIR}/${P}-riscv32.patch"
)
src_prepare() {