diff mbox

[oe,meta-oe,V2] hplip: Fix build with clang

Message ID 20161221060306.19798-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Dec. 21, 2016, 6:03 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...de-cups-ppd.h-for-missing-ppd-definitions.patch | 40 ++++++++++++++++++++++
 meta-oe/recipes-extended/hplip/hplip_3.12.6.bb     |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch

-- 
2.11.0

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

Patch

diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
new file mode 100644
index 000000000..84a39aeb8
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
@@ -0,0 +1,40 @@ 
+From 7ef9c040dd959105c16d4dc67e14f3bbea25e77f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Dec 2016 19:51:19 +0000
+Subject: [PATCH] include cups/ppd.h for missing ppd definitions
+
+Fixes errors spotted by clang
+
+| prnt/hpcups/HPCupsFilter.cpp:365:18: error: use of undeclared identifier 'ppdFindAttr'
+|     if (((attr = ppdFindAttr(m_ppd, "hpPrinterLanguage", NULL)) == NULL) ||
+|                  ^
+| prnt/hpcups/HPCupsFilter.cpp:368:13: error: use of undeclared identifier 'ppdClose'
+|             ppdClose(m_ppd);
+|             ^
+| prnt/hpcups/HPCupsFilter.cpp:444:9: error: use of undeclared identifier 'ppdClose'
+|         ppdClose(m_ppd);
+|         ^
+| prnt/hpcups/HPCupsFilter.cpp:497:13: error: use of undeclared identifier 'ppdOpenFile'
+|     m_ppd = ppdOpenFile(getenv("PPD"));
+|             ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ prnt/hpcups/HPCupsFilter.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: hplip-3.12.6/prnt/hpcups/HPCupsFilter.h
+===================================================================
+--- hplip-3.12.6.orig/prnt/hpcups/HPCupsFilter.h
++++ hplip-3.12.6/prnt/hpcups/HPCupsFilter.h
+@@ -37,7 +37,7 @@
+ #include "Job.h"
+ 
+ #include "dbuscomm.h"
+-
++#include <cups/ppd.h>
+ #define		DBITMAPFILEHEADER		14
+ #define		DBITMAPINFOHEADER		40
+ 
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb b/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
index 9848e5ac1..1f1e80ce8 100644
--- a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
+++ b/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
@@ -9,6 +9,7 @@  SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
            file://fix-libusb-paths.patch \
            file://cups-1.6.patch \
            file://configure.patch \
+           file://0001-include-cups-ppd.h-for-missing-ppd-definitions.patch \
 "
 
 DEPENDS += "cups python libusb"