[tz] make error

Paul Eggert eggert at cs.ucla.edu
Fri Nov 17 02:50:58 UTC 2023

On 11/16/23 11:51, Alois Treindl via tz wrote:
> cc -DTZDIR='"/usr/share/zoneinfo"'    -c -o zic.o zic.c
> In file included from zic.c:16:0:
> private.h:791:60: error: conflicting types for ‘restrict’
>   struct tm *localtime_rz(timezone_t restrict, time_t const *restrict,

That's a consequence of this NEWS item in 2023a:
                                                    The code by default 
is now designed for C99 or later.  To build in
     a C89 environment, compile with -DPORT_TO_C89.  To support C89
     callers of the tzcode library, compile with -DSUPPORT_C89.  The
     two new macros are transitional aids planned to be removed in a
     future version, when C99 or later will be required.

On your old platform, gcc defaults to C89. To work around this 
compatibility issue on that platform you can use either of the following 
two shell commands:

make CFLAGS='-std=gnu11'


The former's probably better for you, since it lets tzcode use C11 
features. The latter should be portable to any platform that does not 
support C99 even with compiler options.

Either 'make' command should work without having to modify tzcode.

More information about the tz mailing list