[tz] make error
Alois Treindl
alois at astro.ch
Thu Nov 16 19:58:00 UTC 2023
I fixed it by adding after private.h line 558:
It now reads
#if (__STDC_VERSION__ < 199901 && !defined restrict \
&& (PORT_TO_C89 || defined _MSC_VER))
# define restrict
#else
# define restrict
#endif
But I wonder why nobody stumbled upon this.
On 16.11.23 20:51, Alois Treindl via tz wrote:
>
> I just made a new clone of tz.
>
> I work normally on RHEL 7 (redhat enterprise Linux)
> with gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
>
> When I say make or make all, I get something I never observed before:
>
> 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,
> ^
> private.h:791:36: note: previous definition of ‘restrict’ was here
> struct tm *localtime_rz(timezone_t restrict, time_t const *restrict,
> ^
> private.h:792:15: error: conflicting types for ‘restrict’
> struct tm *restrict);
> ^
> private.h:791:60: note: previous definition of ‘restrict’ was here
> struct tm *localtime_rz(timezone_t restrict, time_t const *restrict,
> ^
> private.h:793:49: error: conflicting types for ‘restrict’
> time_t mktime_z(timezone_t restrict, struct tm *restrict);
> ^
> private.h:793:28: note: previous definition of ‘restrict’ was here
> time_t mktime_z(timezone_t restrict, struct tm *restrict);
>
>
> This does not happen when I compile on RHEL 9
> gcc version 11.4.1 20230605 (Red Hat 11.4.1-2) (GCC)
>
> Can anyone point me to a fix?
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20231116/04e69ed4/attachment.htm>
More information about the tz
mailing list