libmilter: fix compilation on Darwin

* configure compilation options
* patch sendmail.h header inclusion

+29 -1
+28
pkgs/development/libraries/libmilter/darwin.patch
··· 1 + Fix build issues on Darwin. 2 + 3 + --- a/devtools/OS/Darwin 2014-03-05 01:59:45.000000000 +0100 4 + +++ b/devtools/OS/Darwin 2020-05-18 14:47:57.000000000 +0200 5 + @@ -8,6 +8,8 @@ 6 + # We look a lot more like 4.4BSD than NeXTStep or OpenStep. 7 + # 8 + define(`confCC', `cc -traditional-cpp -pipe ${Extra_CC_Flags}') 9 + +define(`confCCOPTS_SO', `-fPIC') 10 + +define(`confSOEXT', `dylib') 11 + define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX -DNETINFO -DAUTO_NETINFO_ALIASES -DAUTO_NETINFO_HOSTS') 12 + define(`confENVDEF', `-DDARWIN') 13 + define(`confLDOPTS', `${Extra_LD_Flags}') 14 + --- a/sendmail/sendmail.h 2020-05-18 14:51:17.000000000 +0200 15 + +++ b/sendmail/sendmail.h 2020-05-18 14:51:00.000000000 +0200 16 + @@ -104,7 +104,11 @@ 17 + # endif /* NETX25 */ 18 + 19 + # if NAMED_BIND 20 + -# include <arpa/nameser.h> 21 + +# ifdef __APPLE__ 22 + +# include <arpa/nameser_compat.h> 23 + +# else 24 + +# include <arpa/nameser.h> 25 + +# endif 26 + # ifdef NOERROR 27 + # undef NOERROR /* avoid <sys/streams.h> conflict */ 28 + # endif /* NOERROR */
+1 -1
pkgs/development/libraries/libmilter/default.nix
··· 32 32 sh Build -f ./a.m4 33 33 ''; 34 34 35 - patches = [ ./install.patch ./sharedlib.patch ./glibc-2.30.patch ]; 35 + patches = [ ./install.patch ./sharedlib.patch ./glibc-2.30.patch ./darwin.patch ]; 36 36 37 37 nativeBuildInputs = [ m4 ]; 38 38