Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libproxy: Fix build errors due to missing prototypes
@ 2012-03-01 18:08 Khem Raj
  2012-03-01 23:16 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2012-03-01 18:08 UTC (permalink / raw)
  To: openembedded-core

g++ really does not like the missing prototypes
here we were missing close() and read() so include
unistd.h to get them

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../libproxy/libproxy/g++-namepace.patch           |   22 ++++++++++++++++++++
 meta/recipes-support/libproxy/libproxy_0.4.7.bb    |    6 +++-
 2 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/libproxy/libproxy/g++-namepace.patch

diff --git a/meta/recipes-support/libproxy/libproxy/g++-namepace.patch b/meta/recipes-support/libproxy/libproxy/g++-namepace.patch
new file mode 100644
index 0000000..cb90ab7
--- /dev/null
+++ b/meta/recipes-support/libproxy/libproxy/g++-namepace.patch
@@ -0,0 +1,22 @@
+include unistd.h to get prototypes of close() and read()
+otherwise g++ complains
+
+libproxy/url.cpp:439:13: error: 'close' was not declared in this scope
+libproxy/url.cpp:398:37: error: 'read' was not declared in this scope
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: libproxy-0.4.7/libproxy/url.cpp
+===================================================================
+--- libproxy-0.4.7.orig/libproxy/url.cpp	2012-03-01 09:51:11.254156247 -0800
++++ libproxy-0.4.7/libproxy/url.cpp	2012-03-01 09:56:12.058171256 -0800
+@@ -33,6 +33,7 @@
+ #include <cstdlib>    // For atoi()
+ #include <sys/stat.h> // For stat()
+ #include <algorithm> // For transform()
++#include <unistd.h> // For close(), read()
+ 
+ #ifdef WIN32
+ #include <io.h>
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.7.bb b/meta/recipes-support/libproxy/libproxy_0.4.7.bb
index f31b701..2cb8ed3 100644
--- a/meta/recipes-support/libproxy/libproxy_0.4.7.bb
+++ b/meta/recipes-support/libproxy/libproxy_0.4.7.bb
@@ -8,9 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7d7044444a7b1b116e8783edcdb44ff4 \
 
 DEPENDS = "gconf"
 
-PR = "r1"
+PR = "r2"
 
-SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.tar.gz"
+SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.tar.gz \
+           file://g++-namepace.patch \
+          "
 
 SRC_URI[md5sum] = "509e03a488a61cd62bfbaf3ab6a2a7a5"
 SRC_URI[sha256sum] = "8fe0a58810139ba3c2e186deccf3e68adcd127aa0e972b0862b30b3dde493797"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-01 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 18:08 [PATCH] libproxy: Fix build errors due to missing prototypes Khem Raj
2012-03-01 23:16 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox