I just tried to build libmilter on macOS 10.13 (for clamav, and I don't actually need milter, but that's not the point). It fails to build with: cc -pipe -O3 -I. -I../../sendmail -I../../include -DDARWIN=170000 -DBIND_8_COMPAT -DNETINET6 -I/opt/pkg/include -DSMRSH_CMDDIR=\"\" -DNETINET6 -DNEEDSGETIPNODE -DNOT_SENDMAIL -Dsm_snprintf=snprintf -DSM_CONF_POLL=1 -DXP_MT -I/usr/include -c sm_gethost.c sm_gethost.c:67:33: error: use of undeclared identifier 'sm_res'; did you mean '_res'? resv6 = bitset(RES_USE_INET6, sm_res.options); ^~~~~~ _res ../../include/sm/bitops.h:55:31: note: expanded from macro 'bitset' # define bitset(bit, word) (((word) & (bit)) != 0) ^ /usr/include/resolv.h:307:27: note: '_res' declared here extern struct __res_state _res; ^ sm_gethost.c:68:3: error: use of undeclared identifier 'sm_res'; did you mean '_res'? sm_res.options |= RES_USE_INET6; ^~~~~~ _res /usr/include/resolv.h:307:27: note: '_res' declared here extern struct __res_state _res; ^ sm_gethost.c:75:3: error: use of undeclared identifier 'sm_res'; did you mean '_res'? sm_res.options &= ~RES_USE_INET6; ^~~~~~ _res /usr/include/resolv.h:307:27: note: '_res' declared here extern struct __res_state _res; ^ 3 errors generated. *** Error code 1 I see in patch-ap this is patched from _res to sm_res, but the patch doesn't have a comment and I didn't find an explanation. It seems there are other patches that introduce this, and I wonder if something was missed, although libmilter builds on NetBSD. I have not been able to understand the sm_res scheme, but it seems conditional on something, and I wonder if the conditionals of providing it and using it are out of sync for mac somehow. In particular in sm_resolve.c, I see patched +#if NAMED_BIND +extern struct __res_state sm_res; +#endif and I don't follow that vs using the _res definition from the system resolv.h, unless there's some system that doesn't provide it. I also don't follow why the patch declares sm_res conditionally and appears to use it unconditonally. As you have set yourself to $OWNER, I'm writing instead of changing anything, and would appreciate it if you could fix this by start of freeze, expected early next week. Thanks, Greg
Attachment:
signature.asc
Description: PGP signature