aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/omgps
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-05-09 10:09:35 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-05-09 10:19:18 +0200
commite1f165605e7497ba39aaf5c67b1dcf36d972b7d4 (patch)
tree8b6307c990ca0fca8690d1bd85a26067c5e8e054 /recipes/omgps
parent0b8a54579055344c614cadf57d6a0ae4952bbc86 (diff)
downloadopenembedded-e1f165605e7497ba39aaf5c67b1dcf36d972b7d4.tar.gz
omgps: fix build with capabilities enabled
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/omgps')
-rw-r--r--recipes/omgps/omgps/fix.capability.patch59
-rw-r--r--recipes/omgps/omgps_svn.bb6
2 files changed, 63 insertions, 2 deletions
diff --git a/recipes/omgps/omgps/fix.capability.patch b/recipes/omgps/omgps/fix.capability.patch
new file mode 100644
index 0000000000..56ec3a4453
--- /dev/null
+++ b/recipes/omgps/omgps/fix.capability.patch
@@ -0,0 +1,59 @@
+we need to include config.h first to know if HAVE_SYS_CAPABILITY_H is enabled or no, otherwise
+sys/capability.h is not included and later used
+| src/network.c: In function 'can_ping':
+| src/network.c:198:2: error: 'cap_flag_value_t' undeclared (first use in this function)
+| src/network.c:198:2: note: each undeclared identifier is reported only once for each function it appears in
+| src/network.c:198:19: error: expected ';' before 'cap'
+| src/network.c:199:2: error: 'cap_t' undeclared (first use in this function)
+| src/network.c:199:8: error: expected ';' before 'caps'
+| src/network.c:200:6: error: 'caps' undeclared (first use in this function)
+| cc1: warnings being treated as errors
+| src/network.c:203:2: error: implicit declaration of function 'cap_get_flag'
+| src/network.c:203:21: error: 'CAP_SYS_NICE' undeclared (first use in this function)
+| src/network.c:203:35: error: 'CAP_EFFECTIVE' undeclared (first use in this function)
+| src/network.c:203:51: error: 'cap' undeclared (first use in this function)
+| src/network.c:204:17: error: 'CAP_CLEAR' undeclared (first use in this function)
+| src/network.c:210:1: error: control reaches end of non-void function
+| make[1]: *** [omgps-network.o] Error 1
+
+and -lcap is needed for 2 functions later (should be added only for HAVE_SYS_CAPABILITY_H enabled, but I don't care enough)
+| omgps-network.o: In function `can_ping':
+| /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:199: undefined reference to `cap_get_proc'
+| /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:203: undefined reference to `cap_get_flag'
+| collect2: ld returned 1 exit status
+
+--- omgps.orig/src/network.c 2009-10-28 18:51:16.000000000 +0100
++++ omgps/src/network.c 2011-05-09 09:59:11.637676772 +0200
+@@ -19,16 +19,16 @@
+ #include <assert.h>
+ #include <glib.h>
+
+-#if (HAVE_SYS_CAPABILITY_H)
+-#undef _POSIX_SOURCE
+-#include <sys/capability.h>
+-#endif
+-
+ #include "config.h"
+ #include "util.h"
+ #include "network.h"
+ #include "customized.h"
+
++#if (HAVE_SYS_CAPABILITY_H)
++#undef _POSIX_SOURCE
++#include <sys/capability.h>
++#endif
++
+ /**
+ * Ping: reference <Unix network programming>, volume 1, third edition.
+ */
+--- omgps.orig/Makefile.am 2009-10-28 18:51:17.000000000 +0100
++++ omgps/Makefile.am 2011-05-09 10:04:58.578676679 +0200
+@@ -33,7 +33,7 @@
+
+ omgps_CFLAGS = $(common_CFLAGS) -O2
+ omgps_LDFLAGS =
+-omgps_LDADD = @DEPENDENCIES_LIBS@ -lpython$(PY_VERSION)
++omgps_LDADD = @DEPENDENCIES_LIBS@ -lcap -lpython$(PY_VERSION)
+
+ omgps_SOURCES = \
+ src/ctx_agps_online.c \
diff --git a/recipes/omgps/omgps_svn.bb b/recipes/omgps/omgps_svn.bb
index 1c993d66ec..160469de48 100644
--- a/recipes/omgps/omgps_svn.bb
+++ b/recipes/omgps/omgps_svn.bb
@@ -6,10 +6,12 @@ DEPENDS = "gtk+ python-pygobject dbus-glib"
#PACKAGES = "${PN}-dbg ${PN}"
SRCREV = "109"
PV = "0.1+svnr${SRCPV}"
-PR = "r1"
+PR = "r2"
S = "${WORKDIR}/${PN}"
SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;proto=http \
file://gcc-4.4.patch \
- file://sysfs.node.2.6.32.patch"
+ file://sysfs.node.2.6.32.patch \
+ file://fix.capability.patch \
+"
inherit autotools