[tz] gcc 8 demanded patch (from NetBSD)

Robert Elz kre at munnari.OZ.AU
Wed May 10 00:23:57 UTC 2017


The following patch was recently added to NetBSD, to appease
GCC 8 (apparently) ... "hit" is a bool, and it seems gcc 8 does
not like ++ operators applied to one of those.

(deleted parts of the diff which just showed the version ID string
being updated...)

kre

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.106 src/lib/libc/time/localtime.c:1.107
--- src/lib/libc/time/localtime.c:1.106	Sat Mar 11 18:23:14 2017
+++ src/lib/libc/time/localtime.c	Tue May  9 02:30:49 2017
@@ -1716,7 +1716,7 @@ timesub(const time_t *timep, int_fast32_
 						sp->lsis[i - 1].ls_trans + 1 &&
 						sp->lsis[i].ls_corr ==
 						sp->lsis[i - 1].ls_corr + 1) {
-							++hit;
+							hit = true;
 							--i;
 					}
 			}




More information about the tz mailing list