Re: [util-linux PATCH] Support hwclock for GNU Hurd

2024-12-05 Thread Zhaoming Luo
On 12/5/24 9:53 PM, Sergey Bugaev wrote: On Thu, Dec 5, 2024 at 3:39 PM Zhaoming Luo wrote: - rtc_dev_fd = open(rtc_dev_name, O_RDONLY); + rtc_dev_fd = open(rtc_dev_name, O_RDONLY | O_WRONLY); It's called "xxx-only" for a reason :) On standard Unix, you should use

Re: [util-linux PATCH] Support hwclock for GNU Hurd

2024-12-05 Thread Sergey Bugaev
On Thu, Dec 5, 2024 at 3:39 PM Zhaoming Luo wrote: > - rtc_dev_fd = open(rtc_dev_name, O_RDONLY); > + rtc_dev_fd = open(rtc_dev_name, O_RDONLY | O_WRONLY); It's called "xxx-only" for a reason :) On standard Unix, you should use O_RDWR for this. Now, on the Hurd, these

[util-linux PATCH] Support hwclock for GNU Hurd

2024-12-05 Thread Zhaoming Luo
* configure.ac: add HURD so it can be used in conditional in am files * sys-utils/Makemodule.am: compile hwclock for GNU Hurd * sys-utils/hwclock-cmos.c: avoid nested declaration warning * sys-utils/hwclock-rtc.c: compile for GNU Hurd * sys-utils/hwclock.c: compile for GNU Hurd * sys-utils/hwclock.