[Toybox] [PATCH] Fix macOS build.

enh enh at google.com
Thu Apr 2 10:50:50 PDT 2020


I'd put the rtc_wkalarm struct in the globals to get it zeroed for
free, but since there's no such type on macOS, that breaks the
build. Rather than define a bogus struct in portability.h, I've
gone for making it an explicitly-zeroed local. (And I've sorted the
locals largest-first.)

Note that the use of struct rtc_time as if it was the same as struct
tm in this code follows the existing code in hwclock, but I worry
that we're going to have trouble with that because of the extra
tm_gmtoff and tm_zone fields in struct tm. But that's a worry for
another day...

This patch also removes the CONFIG_CP_PRESERVE from the macos_miniconfig,
since that option was removed a while back.
---
 kconfig/macos_miniconfig | 1 -
 toys/pending/rtcwake.c   | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-macOS-build.patch
Type: application/octet-stream
Size: 1775 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200402/a5cad675/attachment-0002.obj>


More information about the Toybox mailing list