$NetBSD: patch-unix_unxcfg.h,v 1.4 2025/07/03 09:59:10 jperkin Exp $ * Fix build on Debian GNU/kFreeBSD. * Fix build under OpenBSD 5.5 Patch from OpenBSD Ports "timeb was already well deprecated on 4.4BSD" * Remove K&R prototype for gmtime() --- unix/unxcfg.h.orig 2009-04-16 18:36:12.000000000 +0000 +++ unix/unxcfg.h @@ -52,6 +52,7 @@ #include /* off_t, time_t, dev_t, ... */ #include +#include #ifdef NO_OFF_T typedef long zoff_t; @@ -111,16 +112,17 @@ typedef struct stat z_stat; #ifdef BSD # include -# include +# ifndef BSD4_4 +# include +# endif # if (defined(_AIX) || defined(__GLIBC__) || defined(__GNU__)) # include # endif #else # include - struct tm *gmtime(), *localtime(); #endif -#if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN))) +#if (defined(BSD4_4) || defined(__illumos__) || (defined(SYSV) && defined(MODERN))) # include /* this includes utime.h on SGIs */ # if (defined(BSD4_4) || defined(linux) || defined(__GLIBC__)) # include @@ -130,7 +132,7 @@ typedef struct stat z_stat; # include # define GOT_UTIMBUF # endif -# if (!defined(GOT_UTIMBUF) && defined(__GNU__)) +# if (!defined(GOT_UTIMBUF) && (defined(__GNU__) || defined(__illumos__))) # include # define GOT_UTIMBUF # endif