main/bluez: upgrade to 5.18

This commit is contained in:
Natanael Copa 2014-04-21 14:22:38 +00:00
parent f6c3d3a79c
commit 78a3bc59aa
4 changed files with 8 additions and 170 deletions

View File

@ -1,49 +0,0 @@
From 16fc9188b9de0e15454a31072b9636b9fa683d89 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 14 Mar 2014 07:27:33 +0000
Subject: [PATCH 1/3] shared: include endian.h for be32toh, htobe32 and htobe64
functions
The man page says that #include <endian.h> is needed for those.
This fixes the following compile error when building with musl libc on
Alpine Linux:
src/shared/btsnoop.o: In function `btsnoop_write':
.../src/bluez/src/shared/btsnoop.c:208: undefined reference to `htobe32'
.../src/bluez/src/shared/btsnoop.c:209: undefined reference to `htobe32'
.../src/bluez/src/shared/btsnoop.c:210: undefined reference to `htobe32'
.../src/bluez/src/shared/btsnoop.c:211: undefined reference to `htobe32'
.../src/bluez/src/shared/btsnoop.c:212: undefined reference to `htobe64'
src/shared/btsnoop.o: In function `btsnoop_open':
.../src/bluez/src/shared/btsnoop.c:100: undefined reference to `be32toh'
.../src/bluez/src/shared/btsnoop.c:103: undefined reference to `be32toh'
src/shared/btsnoop.o: In function `btsnoop_create':
.../src/bluez/src/shared/btsnoop.c:151: undefined reference to `htobe32'
.../src/bluez/src/shared/btsnoop.c:152: undefined reference to `htobe32'
src/shared/btsnoop.o: In function `pklg_read_hci':
.../src/bluez/src/shared/btsnoop.c:336: undefined reference to `be32toh'
.../src/bluez/src/shared/btsnoop.c:338: undefined reference to `be64toh'
src/shared/btsnoop.o: In function `btsnoop_read_hci':
.../src/bluez/src/shared/btsnoop.c:416: undefined reference to `be32toh'
.../src/bluez/src/shared/btsnoop.c:417: undefined reference to `be32toh'
.../src/bluez/src/shared/btsnoop.c:419: undefined reference to `be64toh'
---
src/shared/btsnoop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/shared/btsnoop.c b/src/shared/btsnoop.c
index d2b3b4b..17a872c 100644
--- a/src/shared/btsnoop.c
+++ b/src/shared/btsnoop.c
@@ -25,6 +25,7 @@
#include <config.h>
#endif
+#include <endian.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
--
1.9.0

View File

@ -1,64 +0,0 @@
From ca6bd966bca447c9e5f914f56a1432c7b695b251 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 21 Jan 2014 21:06:03 +0000
Subject: [PATCH 2/3] unit: prevent unintended use of glibc's error(3)
When building the test-sdp we don't want src/sdpd-request.c end up
using the incompatible GNU libc's error(3) instead of the intended
src/log.c's error().
This also fixes the following compile error on Alpine Linux with musl
libc which does not implement the error(3) GNU extension:
src/sdpd-request.o: In function `extract_des':
/home/ncopa/src/bluez/src/sdpd-request.c:126: undefined reference to `error'
src/sdpd-request.o: In function `process_request':
/home/ncopa/src/bluez/src/sdpd-request.c:1022: undefined reference to `error'
/home/ncopa/src/bluez/src/sdpd-request.c:1045: undefined reference to `error'
---
Makefile.am | 1 +
unit/test-sdp.c | 9 +++------
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index fb11230..700b956 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -265,6 +265,7 @@ unit_tests += unit/test-sdp
unit_test_sdp_SOURCES = unit/test-sdp.c \
src/shared/util.h src/shared/util.c \
src/sdpd.h src/sdpd-database.c \
+ src/log.h src/log.c \
src/sdpd-service.c src/sdpd-request.c
unit_test_sdp_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
diff --git a/unit/test-sdp.c b/unit/test-sdp.c
index 9b82343..853576d 100644
--- a/unit/test-sdp.c
+++ b/unit/test-sdp.c
@@ -128,12 +128,6 @@ static void sdp_debug(const char *str, void *user_data)
g_print("%s%s\n", prefix, str);
}
-void btd_debug(const char *format, ...);
-
-void btd_debug(const char *format, ...)
-{
-}
-
static void context_quit(struct context *context)
{
g_main_loop_quit(context->main_loop);
@@ -797,6 +791,9 @@ int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
+ if (g_test_verbose())
+ __btd_log_init("*", 0);
+
/*
* Service Search Request
*
--
1.9.0

View File

@ -1,40 +0,0 @@
From 9f4a63e594d676bd116c2d067db0a2a1d37e5f33 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 17 Jan 2014 10:08:50 +0000
Subject: [PATCH 3/3] bnep: avoid use of caddr_t
caddr_t is legacy BSD and should be avoided.
This fixes the following compile error on Alpine Linux with musl libc:
profiles/network/bnep.c: In function 'bnep_if_up':
profiles/network/bnep.c:205:33: error: 'caddr_t' undeclared (first use in this function)
err = ioctl(sk, SIOCSIFFLAGS, (caddr_t) &ifr);
---
profiles/network/bnep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index ece979f..b93027a 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -204,7 +204,7 @@ static int bnep_if_up(const char *devname)
ifr.ifr_flags |= IFF_UP;
ifr.ifr_flags |= IFF_MULTICAST;
- err = ioctl(sk, SIOCSIFFLAGS, (caddr_t) &ifr);
+ err = ioctl(sk, SIOCSIFFLAGS, (void *) &ifr);
close(sk);
@@ -229,7 +229,7 @@ static int bnep_if_down(const char *devname)
ifr.ifr_flags &= ~IFF_UP;
/* Bring down the interface */
- err = ioctl(sk, SIOCSIFFLAGS, (caddr_t) &ifr);
+ err = ioctl(sk, SIOCSIFFLAGS, (void *) &ifr);
close(sk);
--
1.9.0

View File

@ -1,6 +1,6 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=5.16
pkgver=5.18
pkgrel=0
pkgdesc="Tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
@ -15,9 +15,7 @@ makedepends="dbus-dev libusb-compat-dev udev-dev
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-cups
$pkgname-hid2hci"
source="http://www.kernel.org/pub/linux/bluetooth/bluez-$pkgver.tar.xz
0001-shared-include-endian.h-for-be32toh-htobe32-and-htob.patch
0002-unit-prevent-unintended-use-of-glibc-s-error-3.patch
0003-bnep-avoid-use-of-caddr_t.patch
0001-tools-fix-headers-for-bcm43xx.patch
bluetooth.initd
rfcomm.initd
rfcomm.confd
@ -31,7 +29,6 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
libtoolize --force && aclocal && autoconf && automake --add-missing
}
build() {
@ -76,24 +73,18 @@ hid2hci() {
mv "$pkgdir"/lib "$subpkgdir"/
}
md5sums="4cf4e60e5eaed8eaf42caa816d356ca1 bluez-5.16.tar.xz
983fa9455a969e0df38ddbe9ab460917 0001-shared-include-endian.h-for-be32toh-htobe32-and-htob.patch
1d87b1ed2603eb37ae96d4368192737a 0002-unit-prevent-unintended-use-of-glibc-s-error-3.patch
e320ccd2ec08d81018ed4f92f198bf66 0003-bnep-avoid-use-of-caddr_t.patch
md5sums="9c71404f86287cd9441e86783be3aae1 bluez-5.18.tar.xz
3a82f8466e8b83b71f46df3710d235ca 0001-tools-fix-headers-for-bcm43xx.patch
7a5611fa2cf42da2e844f96b2efa9f3b bluetooth.initd
7672edb8e33c4495ee9febb9864feb10 rfcomm.initd
7f4bb093adb0f519c621f2ea68712f35 rfcomm.confd"
sha256sums="c8d5094a21a799dca9cdcd99651dc19d521af514b22b8178fc787c454cdbb163 bluez-5.16.tar.xz
3ec238c343466e5f835365c2d9fa7d3039fc22b9a40bc98aa3f8dda4a2bccf50 0001-shared-include-endian.h-for-be32toh-htobe32-and-htob.patch
d1a7018c0971ad52d31b6eb6231deb86de5f913d0a6661992716c6a797c2c1bc 0002-unit-prevent-unintended-use-of-glibc-s-error-3.patch
6d3c08dd9ddd2c16b74a0e4039c336a2b78dbb2e5b7a54e040ebfb76009a065e 0003-bnep-avoid-use-of-caddr_t.patch
sha256sums="8c8bb13db83d0de6c85def2da8dfa0a758aff595405fb57a00719ed94d558340 bluez-5.18.tar.xz
cda215d16807ee3669c9f5cd8c67a3f134d644e8b46aa54609f67421796558f8 0001-tools-fix-headers-for-bcm43xx.patch
d4aef203e184bef4284b3719268c91e07a1e3f84cbdea2ac8ab40a2617ac9186 bluetooth.initd
4430703a9bec9a9482416b2d24aa47492264768a0b61356b361bbc8b1229a83e rfcomm.initd
672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08 rfcomm.confd"
sha512sums="27ac9aa98107b234696885ce3f40736dc25b9e4b34baa6b4d9dd3f0b81d4ca364a819f42801bddc8c1a247be1db37ac3c7e7802188ad943b996c07b640db65b1 bluez-5.16.tar.xz
b7c946cac036a639eeb31e34437ed8e84b6613bc8da7b564b585b30bd02323843545b932ee49c2f53176315075f57e471ba397a725e052f7a3bfdc68c2e4ec32 0001-shared-include-endian.h-for-be32toh-htobe32-and-htob.patch
e1cd0675c037ab1cfdbda0cbb8e1ea493ee1ad9fb447c4836b9fd97df35ee63a6535f903ea6260c3fa40a36b48fdc8bff490a98f659edb8717adb3bc854d6c0e 0002-unit-prevent-unintended-use-of-glibc-s-error-3.patch
90b8270e3101f1e8e2bbde1f31b27cedaac40ebbd91e754ce5150829667cfb15b9ba71bd39bfb6fff6d4d72a905b1cdf0eba84931adecc1236902bfe37b9020e 0003-bnep-avoid-use-of-caddr_t.patch
sha512sums="fbf5d68ae6a0c5c33fb0c645f0b6625624ffb08aa498147c90df53c5a5b3a9e67dc4ae5fcba81fb8399755287ca78cc31f936e7ac3a7760fde9783408a459188 bluez-5.18.tar.xz
cd7010c5cac9e5020b5509eda42b19117ecccb41dc81537d6a0f125956a7372146e8d2246b69b1ef65dee5a902f888d28c0e52b48dfd1a7c1545a7d969ead7e1 0001-tools-fix-headers-for-bcm43xx.patch
2c13cde6561c5aa8b2f27306851458966c67853f6ac2358d09019fda14d3d8e3ff6d9f1c90512c67063d1e1954ec05bf117c5fafc7716446cc5786e9cc12c49f bluetooth.initd
8f14b4e05c9ecaf4586ed2fdc2d2519de6b613de62ae5c95508baa682630f3112c5b6db6850f76679afc49e06f2ad035d148fa30b9b980747b6fb423f7bebe88 rfcomm.initd
a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb rfcomm.confd"