From 6f0b71f1efad302d77241ea7e421bd551bcf9570 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 14 Mar 2018 15:56:27 -0400 Subject: [PATCH] Fix for a problem with hwclock --- .../util-linux/util-linux/ioctl_fix.patch | 38 +++++++++++++++++++ .../util-linux/util-linux_2.31.bbappend | 3 ++ 2 files changed, 41 insertions(+) create mode 100644 meta-citadel/recipes-core/util-linux/util-linux/ioctl_fix.patch create mode 100644 meta-citadel/recipes-core/util-linux/util-linux_2.31.bbappend diff --git a/meta-citadel/recipes-core/util-linux/util-linux/ioctl_fix.patch b/meta-citadel/recipes-core/util-linux/util-linux/ioctl_fix.patch new file mode 100644 index 0000000..1037284 --- /dev/null +++ b/meta-citadel/recipes-core/util-linux/util-linux/ioctl_fix.patch @@ -0,0 +1,38 @@ +From 32337d96b1fda2d8bfff753277f45a1ba0ee118c Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 23 Nov 2017 10:30:27 +0100 +Subject: [PATCH] hwclock: revert ioctl test + +This commit reverts 1d5cffa16a0183175684809cf215294ec20b8fd9. + +(I did this revert manually as there was another changes in the code +and git-revert does not work in this case.) + +Addresses: https://github.com/karelzak/util-linux/issues/543 +Signed-off-by: Karel Zak +--- + sys-utils/hwclock-rtc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c +index 62e432937..cdd7d80d6 100644 +--- a/sys-utils/hwclock-rtc.c ++++ b/sys-utils/hwclock-rtc.c +@@ -261,7 +261,7 @@ static int synchronize_to_clock_tick_rtc(const struct hwclock_control *ctl) + * they should. + */ + rc = -1; +- errno = ENOTTY; ++ errno = EINVAL; + #else + rc = ioctl(rtc_fd, RTC_UIE_ON, 0); + #endif +@@ -296,7 +296,7 @@ static int synchronize_to_clock_tick_rtc(const struct hwclock_control *ctl) + if (rc == -1) + warn(_("ioctl() to %s to turn off update interrupts failed"), + rtc_dev_name); +- } else if (errno == ENOTTY) { ++ } else if (errno == ENOTTY || errno == EINVAL) { + /* rtc ioctl interrupts are unimplemented */ + ret = busywait_for_rtc_clock_tick(ctl, rtc_fd); + } else diff --git a/meta-citadel/recipes-core/util-linux/util-linux_2.31.bbappend b/meta-citadel/recipes-core/util-linux/util-linux_2.31.bbappend new file mode 100644 index 0000000..9b5b04e --- /dev/null +++ b/meta-citadel/recipes-core/util-linux/util-linux_2.31.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +# https://github.com/karelzak/util-linux/issues/543 +SRC_URI += "file://ioctl_fix.patch"