diff mbox series

[oe,meta-networking,06/17] postfix: Disable nis support on musl

Message ID 20170718031013.44536-6-raj.khem@gmail.com
State Accepted
Commit f7ce2ae063e63f0063430cf27ea3820df4c0f42e
Headers show
Series [oe,meta-networking,01/17] igmpproxy: Include missing sys/tupes.h and define _GNU_SOURCE | expand

Commit Message

Khem Raj July 18, 2017, 3:10 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...libc-before-setting-CANT_USE_SEND_RECV_MS.patch | 26 ++++++++++++++++++++++
 .../recipes-daemons/postfix/postfix.inc            |  6 ++++-
 .../recipes-daemons/postfix/postfix_3.1.1.bb       | 11 +++++++++
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch

-- 
2.13.3

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch b/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch
new file mode 100644
index 000000000..6b86e3925
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch
@@ -0,0 +1,26 @@ 
+From 63619acf25151d4dade6d65732722ec4a710a5ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 09:54:25 -0700
+Subject: [PATCH] Check for glibc before setting CANT_USE_SEND_RECV_MSG
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/util/sys_defs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index f720e2a..7314c63 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -813,7 +813,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
+-- 
+2.13.3
+
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 4c794ffd6..0ec182a05 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -60,6 +60,9 @@  export AUXLIBS-ldap = "\
 export CCARGS-ldap_class-native = ""
 export AUXLIBS-ldap_class-native = ""
 
+export CCARGS-nonis_libc-musl = "-DNO_NIS"
+export CCARGS-nonis = ""
+
 # SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH
 # current openldap didn't enable SASL
 export CCARGS-sasl  = "\
@@ -70,10 +73,11 @@  export CCARGS-sasl_class-native = ""
 export AUXLIBS-sasl_class-native = ""
 
 # PCRE, TLS support default
-export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
+export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
 export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
 export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
 
+export CCARGS-nonis_libc-musl = "-DNO_NIS"
 # OPT,DEBUG is aready in CFLAGS
 # ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS
 EXTRA_OEMAKE += "OPT= DEBUG= OPTS= "
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb b/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb
index dbbe24ca3..839317d31 100644
--- a/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.1.1.bb
@@ -1,4 +1,15 @@ 
 require postfix.inc
 
+SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
+           file://makedefs.patch \
+           file://install.patch \
+           file://main.cf_2.0 \
+           file://postfix \
+           file://internal_recipient \
+           file://postfix.service \
+           file://aliasesdb \
+           file://check_hostname.sh \
+           file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
+           "
 SRC_URI[md5sum] = "40d72ea143af7ab0038c2cee1f483707"
 SRC_URI[sha256sum] = "3deda4c34631970490b1b5fbb559905f93531bf1c7eb00e38b0d0deb1dba9982"