summaryrefslogtreecommitdiff
path: root/source/n/libmilter
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/libmilter')
-rwxr-xr-xsource/n/libmilter/libmilter.SlackBuild4
-rw-r--r--source/n/libmilter/sendmail-8.15.2-gethostbyname2.patch39
-rw-r--r--source/n/libmilter/site.config.m43
3 files changed, 44 insertions, 2 deletions
diff --git a/source/n/libmilter/libmilter.SlackBuild b/source/n/libmilter/libmilter.SlackBuild
index 81a64f92..bd43e776 100755
--- a/source/n/libmilter/libmilter.SlackBuild
+++ b/source/n/libmilter/libmilter.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libmilter
VERSION=${VERSION:-8.15.2}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -81,6 +81,8 @@ find -L . \
cat $CWD/site.config.m4 | sed "s,@LIBDIRSUFFIX@,$LIBDIRSUFFIX," \
> devtools/Site/site.config.m4
+zcat $CWD/sendmail-8.15.2-gethostbyname2.patch.gz | patch -p1 --verbose || exit 1
+
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX} $PKG/usr/include/$PKGNAM
make -C $PKGNAM O="$SLKCFLAGS" install DESTDIR=$PKG || exit 1
diff --git a/source/n/libmilter/sendmail-8.15.2-gethostbyname2.patch b/source/n/libmilter/sendmail-8.15.2-gethostbyname2.patch
new file mode 100644
index 00000000..03ff909d
--- /dev/null
+++ b/source/n/libmilter/sendmail-8.15.2-gethostbyname2.patch
@@ -0,0 +1,39 @@
+diff --git a/libmilter/sm_gethost.c b/libmilter/sm_gethost.c
+index a025c8f..cd0ef31 100644
+--- a/libmilter/sm_gethost.c
++++ b/libmilter/sm_gethost.c
+@@ -49,8 +49,16 @@ sm_getipnodebyname(name, family, flags, err)
+ int flags;
+ int *err;
+ {
+- bool resv6 = true;
+ struct hostent *h;
++# if HAS_GETHOSTBYNAME2
++
++ h = gethostbyname2(name, family);
++ if (h == NULL)
++ *err = h_errno;
++ return h;
++
++# else /* HAS_GETHOSTBYNAME2 */
++ bool resv6 = true;
+
+ if (family == AF_INET6)
+ {
+@@ -60,7 +68,7 @@ sm_getipnodebyname(name, family, flags, err)
+ }
+ SM_SET_H_ERRNO(0);
+ h = gethostbyname(name);
+- if (family == AF_INET6 && !resv6)
++ if (!resv6)
+ _res.options &= ~RES_USE_INET6;
+
+ /* the function is supposed to return only the requested family */
+@@ -75,6 +83,7 @@ sm_getipnodebyname(name, family, flags, err)
+ else
+ *err = h_errno;
+ return h;
++# endif /* HAS_GETHOSTBYNAME2 */
+ }
+
+ void
diff --git a/source/n/libmilter/site.config.m4 b/source/n/libmilter/site.config.m4
index 5e95b201..1c2202b6 100644
--- a/source/n/libmilter/site.config.m4
+++ b/source/n/libmilter/site.config.m4
@@ -2,5 +2,6 @@ APPENDDEF(`conf_libmilter_ENVDEF',`-DNETINET6=1')
APPENDDEF(`conf_libmilter_ENVDEF',`-D_FFR_WORKERS_POOL=1 -DMIN_WORKERS=4')
APPENDDEF(`conf_libmilter_ENVDEF',`-DSM_CONF_POLL=1')
APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
-APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
+APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DHAS_GETHOSTBYNAME2')
APPENDDEF(`confLIBDIR', `/usr/lib@LIBDIRSUFFIX@ ')