diff options
Diffstat (limited to 'recipes/omgps/omgps/fix.capability.patch')
-rw-r--r-- | recipes/omgps/omgps/fix.capability.patch | 59 |
1 files changed, 59 insertions, 0 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 \ |