Merge pull request #3556 from jprjr/fix-postfix-musl

Postfix: enable build on musl
This commit is contained in:
Juan RP 2016-02-08 18:53:07 +01:00
commit 5ae1648169
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git src/util/sys_defs.h src/util/sys_defs.h
index 5b381af..416676e 100644
--- src/util/sys_defs.h
+++ src/util/sys_defs.h
@@ -812,7 +812,7 @@ extern int initgroups(const char *, int);
#define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \
- || (__GLIBC__ < 2)
+ || (defined(__GLIBC__) && (__GLIBC__ < 2))
#define CANT_USE_SEND_RECV_MSG
#define DEF_SMTP_CACHE_DEMAND 0
#else

View File

@ -1,7 +1,7 @@
# Template file for 'postfix' # Template file for 'postfix'
pkgname=postfix pkgname=postfix
version=3.0.3 version=3.0.3
revision=2 revision=3
short_desc="High-performance mail transport agent" short_desc="High-performance mail transport agent"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="IBM Public License 1.0, BSD-alike" license="IBM Public License 1.0, BSD-alike"
@ -18,6 +18,10 @@ if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ${pkgname}" hostmakedepends+=" ${pkgname}"
fi fi
case "${XBPS_TARGET_MACHINE}" in
*-musl) CFLAGS+=" -DNO_NIS" ;;
esac
system_accounts="postfix" system_accounts="postfix"
postfix_homedir="/var/spool/postfix" postfix_homedir="/var/spool/postfix"
system_groups="postdrop" system_groups="postdrop"