2012-08-22 16:10:55

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 1/4] build: BlueZ version 4.100 or later is required

If we use the BlueZ version less than 4.100, then the following
compilation error happens.

Error:
-----
btio/btio.c: In function ‘l2cap_connect’:
btio/btio.c:301:6: error: ‘struct sockaddr_l2’ has no member named
‘l2_bdaddr_type’
btio/btio.c: In function ‘parse_set_opts’:
btio/btio.c:707:19: error: ‘BDADDR_BREDR’ undeclared (first use in
this function)
btio/btio.c:707:19: note: each undeclared identifier is reported only
once for each function it appears in
make[1]: *** [btio/btio.o] Error 1
make: *** [all] Error 2
---
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 69d71b2..c8e61ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,8 +79,8 @@ PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

-PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99, dummy=yes,
- AC_MSG_ERROR(BlueZ >= 4.99 is required))
+PKG_CHECK_MODULES(BLUEZ, bluez >= 4.100, dummy=yes,
+ AC_MSG_ERROR(BlueZ >= 4.100 is required))
AC_SUBST(BLUEZ_CFLAGS)
AC_SUBST(BLUEZ_LIBS)

--
1.7.4.1



2012-08-22 16:10:58

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 4/4] core: Remove redundant incude errno.h

---
src/server.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/server.c b/src/server.c
index 52f7f1e..16be849 100644
--- a/src/server.c
+++ b/src/server.c
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
-#include <errno.h>
#include <string.h>
#include <inttypes.h>

--
1.7.4.1


2012-08-22 16:10:57

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 3/4] plugins: Remove redundant incude sys/stat.h

---
plugins/filesystem.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/plugins/filesystem.c b/plugins/filesystem.c
index e664fc5..1132a34 100644
--- a/plugins/filesystem.c
+++ b/plugins/filesystem.c
@@ -32,7 +32,6 @@
#include <string.h>
#include <unistd.h>
#include <dirent.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
--
1.7.4.1


2012-08-22 16:10:56

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH obexd 2/4] build: Require GLib 2.32 or later

If we use GLib version less than 2.32 (more precisely < 2.31.2) then
the following build error may occure in a 32 bit.

cc1: warnings being treated as errors
gobex/gobex-apparam.c: In function ‘g_obex_apparam_set_bytes’:
gobex/gobex-apparam.c:176:38: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_uint8’:
gobex/gobex-apparam.c:243:43: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_uint16’:
gobex/gobex-apparam.c:261:43: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_uint32’:
gobex/gobex-apparam.c:282:43: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_uint64’:
gobex/gobex-apparam.c:303:43: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_string’:
gobex/gobex-apparam.c:324:43: error: cast to pointer from integer of
different size
gobex/gobex-apparam.c: In function ‘g_obex_apparam_get_bytes’:
gobex/gobex-apparam.c:342:43: error: cast to pointer from integer of
different size
make[1]: *** [gobex/gobex-apparam.o] Error 1
make: *** [all] Error 2

---

Reference:
GLib tree: Commit: 16292dd753cb63f8ccb2267644aefbd2632dd52c
Author: Lucas De Marchi <[email protected]>
Date: Thu Oct 6 11:18:03 2011 -0300
Fix G*_TO_POINTER casts on 32 bits

If we don't do the cast to the proper size in 32 bits, things like below
doesn't work:

uint8_t u = 20;

void *p;

p = GUINT_TO_POINTER(u);

Signed-off-by: Colin Walters <[email protected]>


Thanks Luiz for giving this reference.

Btb I'm not very sure, is this the best way to solve this problem.

configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c8e61ac..78da420 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,8 +69,8 @@ fi
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))

-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
- AC_MSG_ERROR(GLib >= 2.28 is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
+ AC_MSG_ERROR(GLib >= 2.32 is required))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

--
1.7.4.1