--- opensmtpd-6.0.2p1/openbsd-compat/defines.h +++ opensmtpd-6.0.2p1-patched/openbsd-compat/defines.h @@ -85,7 +85,7 @@ # define STDERR_FILENO 2 #endif -#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0 +#if !HAVE_DECL_O_NONBLOCK # define O_NONBLOCK 00004 /* Non Blocking Open */ #endif --- opensmtpd-6.0.2p1/openbsd-compat/openbsd-compat.h +++ opensmtpd-6.0.2p1-patched/openbsd-compat/openbsd-compat.h @@ -212,11 +212,11 @@ #define pledge(promises, paths) 0 #endif -#ifndef HAVE_DECL_AF_LOCAL +#if !HAVE_DECL_AF_LOCAL #define AF_LOCAL AF_UNIX #endif -#ifndef HAVE_DECL_WAIT_MYPGRP +#if !HAVE_DECL_WAIT_MYPGRP #define WAIT_MYPGRP 0 #endif --- opensmtpd-6.0.2p1/smtpd/to.c +++ opensmtpd-6.0.2p1-patched/smtpd/to.c @@ -210,7 +210,7 @@ #if HAVE_STRUCT_TM_TM_GMTOFF offset = lt->tm_gmtoff; tz = lt->tm_zone; -#elif defined HAVE_DECL_ALTZONE && defined HAVE_DECL_TIMEZONE +#elif HAVE_DECL_ALTZONE && HAVE_DECL_TIMEZONE offset = lt->tm_isdst > 0 ? altzone : timezone; tz = lt->tm_isdst > 0 ? tzname[1] : tzname[0]; #endif