[oe-commits] Robert Yang : cups: check avahi before use it

git at git.openembedded.org git at git.openembedded.org
Wed Jan 7 23:36:26 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: e69a1a583bf65dd2b6358c1d925d8de6419e3d76
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e69a1a583bf65dd2b6358c1d925d8de6419e3d76

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Fri Jan  2 22:03:58 2015 -0800

cups: check avahi before use it

Fixed the error when --disable-avahi:
ippserver.c:425:8: error: unknown type name 'AvahiThreadedPoll'

The avahi is optional, we need check whether it is enabled before use as
other code does.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>

---

 meta/recipes-extended/cups/cups.inc                |  1 +
 ...1-test-ippserver.c-check-avahi-before-use.patch | 34 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 16fdd4f..5ff557a 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -10,6 +10,7 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
            file://cups.socket \
            file://cups.path \
            file://cups.service \
+           file://0001-test-ippserver.c-check-avahi-before-use.patch \
 	  "
 
 LEAD_SONAME = "libcupsdriver.so"
diff --git a/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
new file mode 100644
index 0000000..4bcff69
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
@@ -0,0 +1,34 @@
+From fba92768324e76fa60d9c5f709e045bd4f7aee89 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang at windriver.com>
+Date: Sat, 3 Jan 2015 05:56:24 +0000
+Subject: [PATCH] test/ippserver.c: check avahi before use it
+
+Fixed the error when --disable-avahi:
+ippserver.c:425:8: error: unknown type name 'AvahiThreadedPoll'
+
+The avahi is optional, we need check whether it is enabled before use as
+other code does.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
+---
+ test/ippserver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/ippserver.c b/test/ippserver.c
+index c785e5f..26c8a66 100644
+--- a/test/ippserver.c
++++ b/test/ippserver.c
+@@ -421,7 +421,7 @@ static int		valid_job_attributes(_ipp_client_t *client);
+ 
+ #  ifdef HAVE_DNSSD
+ static DNSServiceRef	DNSSDMaster = NULL;
+-#  else /* HAVE_AVAHI */
++#  elif defined(HAVE_AVAHI) /* HAVE_AVAHI */
+ static AvahiThreadedPoll *DNSSDMaster = NULL;
+ static AvahiClient	*DNSSDClient = NULL;
+ #  endif /* HAVE_DNSSD */
+-- 
+2.0.1
+



More information about the Openembedded-commits mailing list