[Toybox] [PATCH] sntp.c: fix 32-bit.

enh enh at google.com
Fri Jan 10 14:31:49 PST 2020


The epoch was being defined as UL, which is fine for LP64, but too small
on LP32 for what we're trying to do.

toys/net/sntp.c:60:32: warning: left shift count >= width of type
   return ((tv.tv_sec+SEVENTIES)<<32)+(((long long)tv.tv_nsec)<<32)/1000000000;
                                ^~

(Android doesn't use this, I'm just fixing this too while I fix the
LP64isms I introduced in readelf...)
---
 toys/net/sntp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sntp.c-fix-32-bit.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200110/46eee95f/attachment-0002.bin>


More information about the Toybox mailing list