diff options
author | Saul Wold <sgw@linux.intel.com> | 2014-05-19 13:43:40 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-21 09:08:11 +0100 |
commit | 7decf9dce56868e39902dac5957eb72f6e1e9acd (patch) | |
tree | 04f24f31dd03fdb072bb7aaa398a5ad34dde0ee4 | |
parent | 8462728aef78debaa15e33121b3ae733049a96ab (diff) | |
download | openembedded-core-7decf9dce56868e39902dac5957eb72f6e1e9acd.tar.gz openembedded-core-7decf9dce56868e39902dac5957eb72f6e1e9acd.tar.bz2 openembedded-core-7decf9dce56868e39902dac5957eb72f6e1e9acd.zip |
cups: fix for cups not building without avahi
Backport upstream patch for CUPS issue: STR #4402
[YOCTO #6325]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r-- | meta/recipes-extended/cups/cups/cups-str4402.patch | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/meta/recipes-extended/cups/cups/cups-str4402.patch b/meta/recipes-extended/cups/cups/cups-str4402.patch new file mode 100644 index 0000000000..69d349cab1 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups-str4402.patch @@ -0,0 +1,190 @@ + + +Upstream CUPS issue when building with out dnssd/avahi + +https://www.cups.org/str.php?L4408+P-1+S-2+C0+I0+E0+Q + +Upstream-Status: Backport [STR #4402] + +Signed-off-by: Saul Wold <sgw@linux.intel.com> + +--- a/scheduler/dirsvc.c 2014-03-05 13:11:32.000000000 -0800 ++++ b/shceduler/dirsvc.c 2014-05-19 11:33:51.743124614 -0700 +@@ -50,6 +50,9 @@ + static void update_lpd(int onoff); + static void update_smb(int onoff); + ++static void deregister_all_printers(int from_callback); ++static void register_all_printers(int from_callback); ++ + + #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + # ifdef __APPLE__ +@@ -60,12 +63,10 @@ + # ifdef HAVE_AVAHI + static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata); + # endif /* HAVE_AVAHI */ +-static void dnssdDeregisterAllPrinters(int from_callback); + static void dnssdDeregisterInstance(cupsd_srv_t *srv, int from_callback); + static void dnssdDeregisterPrinter(cupsd_printer_t *p, int clear_name, int from_callback); + static const char *dnssdErrorString(int error); + static void dnssdFreeTxtRecord(cupsd_txt_t *txt); +-static void dnssdRegisterAllPrinters(int from_callback); + # ifdef HAVE_DNSSD + static void dnssdRegisterCallback(DNSServiceRef sdRef, + DNSServiceFlags flags, +@@ -241,7 +242,7 @@ + * Register the individual printers + */ + +- dnssdRegisterAllPrinters(0); ++ register_all_printers(0); + } + + +@@ -259,7 +260,7 @@ + * De-register the individual printers + */ + +- dnssdDeregisterAllPrinters(0); ++ deregister_all_printers(0); + + /* + * Shut down browsing sockets... +@@ -579,7 +580,7 @@ + * Register the individual printers + */ + +- dnssdRegisterAllPrinters(1); ++ register_all_printers(1); + break; + + case AVAHI_CLIENT_FAILURE: +@@ -591,7 +592,7 @@ + * Unregister everything and close the client... + */ + +- dnssdDeregisterAllPrinters(1); ++ deregister_all_printers(1); + dnssdDeregisterInstance(&WebIFSrv, 1); + avahi_client_free(DNSSDClient); + DNSSDClient = NULL; +@@ -631,28 +632,6 @@ + + + /* +- * 'dnssdDeregisterAllPrinters()' - Deregister all printers. +- */ +- +-static void +-dnssdDeregisterAllPrinters( +- int from_callback) /* I - Deregistering because of callback? */ +-{ +- cupsd_printer_t *p; /* Current printer */ +- +- +- if (!DNSSDMaster) +- return; +- +- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); +- p; +- p = (cupsd_printer_t *)cupsArrayNext(Printers)) +- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER))) +- dnssdDeregisterPrinter(p, 1, from_callback); +-} +- +- +-/* + * 'dnssdDeregisterInstance()' - Deregister a DNS-SD service instance. + */ + +@@ -858,27 +837,6 @@ + + + /* +- * 'dnssdRegisterAllPrinters()' - Register all printers. +- */ +- +-static void +-dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */ +-{ +- cupsd_printer_t *p; /* Current printer */ +- +- +- if (!DNSSDMaster) +- return; +- +- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); +- p; +- p = (cupsd_printer_t *)cupsArrayNext(Printers)) +- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER))) +- dnssdRegisterPrinter(p, from_callback); +-} +- +- +-/* + * 'dnssdRegisterCallback()' - DNSServiceRegister callback. + */ + +@@ -1813,6 +1771,61 @@ + } + + ++/* ++ * 'deregister_all_printers()' - Deregister all printers. ++ */ ++ ++static void ++deregister_all_printers( ++ int from_callback) /* I - Deregistering because of callback? */ ++{ ++ cupsd_printer_t *p; /* Current printer */ ++ ++ ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ if (!DNSSDMaster) ++ return; ++#endif /* HAVE_DNSSD || HAVE_AVAHI */ ++ ++ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); ++ p; ++ p = (cupsd_printer_t *)cupsArrayNext(Printers)) ++ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER))) ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ dnssdDeregisterPrinter(p, 1, from_callback); ++#else ++ cupsdDeregisterPrinter(p, 1); ++#endif /* HAVE_DNSSD || HAVE_AVAHI */ ++} ++ ++ ++/* ++ * 'register_all_printers()' - Register all printers. ++ */ ++ ++static void ++register_all_printers(int from_callback) /* I - Called from callback? */ ++{ ++ cupsd_printer_t *p; /* Current printer */ ++ ++ ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ if (!DNSSDMaster) ++ return; ++#endif /* HAVE_DNSSD || HAVE_AVAHI */ ++ ++ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); ++ p; ++ p = (cupsd_printer_t *)cupsArrayNext(Printers)) ++ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER))) ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ dnssdRegisterPrinter(p, from_callback); ++#else ++ cupsdRegisterPrinter(p); ++#endif /* HAVE_DNSSD || HAVE_AVAHI */ ++} ++ ++ + /* + * End of "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $". + */ |