--- tz-masterold/private.h 2019-11-30 10:07:16.860120000 -0500 +++ tz-masternew/private.h 2019-11-30 10:12:23.464122000 -0500 @@ -132,11 +132,17 @@ ** Nested includes */ -/* Avoid clashes with NetBSD by renaming NetBSD's declarations. */ +/* + * Avoid clashes with NetBSD by renaming NetBSD's declarations. + * Also, when providing timezone for USG_COMPAT, avoid clashes with the Unix v7 timezone(3) function, which is still available on FreeBSD. + */ #define localtime_rz sys_localtime_rz #define mktime_z sys_mktime_z #define posix2time_z sys_posix2time_z #define time2posix_z sys_time2posix_z +#if 2 <= USG_COMPAT + (TZ_TIME_T || !HAVE_POSIX_DECLS) +# define timezone sys_timezone +#endif #define timezone_t sys_timezone_t #define tzalloc sys_tzalloc #define tzfree sys_tzfree @@ -145,6 +151,9 @@ #undef mktime_z #undef posix2time_z #undef time2posix_z +#if 2 <= USG_COMPAT + (TZ_TIME_T || !HAVE_POSIX_DECLS) +# undef timezone +#endif #undef timezone_t #undef tzalloc #undef tzfree