On Wed, Jul 03, 2019 at 01:37:31PM -0300, Carlos Santos wrote: > On Mon, Jun 24, 2019 at 4:41 AM Karel Zak <kzak@xxxxxxxxxx> wrote: > > > > On Sun, Jun 23, 2019 at 07:30:52PM -0300, unixmania@xxxxxxxxx wrote: > > > Make the static declaration of the cmos_interface struct and related > > > functions conditional to i386/x86_64, preventing several "defined but > > > not used" compiler warnings. > > > > I think we have to be more aggressive :-) It would be better to: > > > > ./configure.ac: > > * add --disable-hwclock-cmos > > * add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64) > > I don't know much about autoconf. How can I test the target > architecture in config.ac. > > > * add define(USE_HWCLOCK_CMOS) > > > > sys-utils/Makemodule.am: > > * compile hwclock-cmos.c only "if USE_HWCLOCK_CMOS" > > > > hwclock: > > * remove all unnecessary #ifdefs from hwclock-cmos.c > > * add #ifdef USE_HWCLOCK_CMOS to hwclock.c:determine_clock_access_method() > > > > > > Note that we already use the same for RTC (which is linux only). > > > > The result will be more readable hwclock-cmos.c and only optional cmos > > code compilation. > > I just sent a third version of the patch comprising all these changes > except for the i386/x86_64 test. I have applied the patch and extended the ./confiugure stuff. https://github.com/karelzak/util-linux/commit/c7eca69d6d89262c71b6d412f6b3a469fad07d7d https://github.com/karelzak/util-linux/commit/b1062292066e0568adbbdbb104b7afdcc5dac25f Thanks! Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com