On Wed, 6 Apr 2022, Randy Dunlap wrote: > When CONFIG_RTC_CLASS is not set, rtc_tm_to_time64() is not defined. > > ... > > m68k-linux-ld: drivers/macintosh/via-pmu.o: in function `pmu_set_rtc_time': > drivers/macintosh/via-pmu.c:1758: undefined reference to `rtc_tm_to_time64' > m68k-linux-ld: drivers/macintosh/via-cuda.o: in function `cuda_set_rtc_time': > drivers/macintosh/via-cuda.c:797: undefined reference to `rtc_tm_to_time64' > > ... > This is a big hammer type of patch. We could possibly do (a) some > conditional code blocks for RTC_CLASS
rtc_tm_to_time64() call sites also appear in several other files without conditionals: arch/powerpc/kernel/time.c arch/powerpc/platforms/8xx/m8xx_setup.c arch/powerpc/platforms/maple/time.c arch/powerpc/platforms/powermac/time.c Why not use mktime64() instead? That seems to be a common pattern for this kind of thing (without needing conditional code).