aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/bluez/0001-bnep-avoid-use-of-caddr_t.patch37
-rw-r--r--main/bluez/0002-various-header-include-fixes-for-building-with-musl-.patch54
-rw-r--r--main/bluez/0003-unit-prevent-use-of-glibc-s-error-3.patch34
-rw-r--r--main/bluez/APKBUILD22
4 files changed, 142 insertions, 5 deletions
diff --git a/main/bluez/0001-bnep-avoid-use-of-caddr_t.patch b/main/bluez/0001-bnep-avoid-use-of-caddr_t.patch
new file mode 100644
index 0000000000..8a6dbe88fe
--- /dev/null
+++ b/main/bluez/0001-bnep-avoid-use-of-caddr_t.patch
@@ -0,0 +1,37 @@
+From 01fa57588b6e1eba85c113335e9c599b725748cb Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 17 Jan 2014 10:08:50 +0000
+Subject: [PATCH 1/3] bnep: avoid use of caddr_t
+
+caddr_t is legacy BSD and should be avoided.
+
+This fixes building against musl libc.
+---
+ 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 2a74016..4f9b801 100644
+--- a/profiles/network/bnep.c
++++ b/profiles/network/bnep.c
+@@ -202,7 +202,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);
+
+@@ -227,7 +227,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.8.5.3
+
diff --git a/main/bluez/0002-various-header-include-fixes-for-building-with-musl-.patch b/main/bluez/0002-various-header-include-fixes-for-building-with-musl-.patch
new file mode 100644
index 0000000000..bc58dba922
--- /dev/null
+++ b/main/bluez/0002-various-header-include-fixes-for-building-with-musl-.patch
@@ -0,0 +1,54 @@
+From e85ee33b48ce92dfe315286089f333fcb1f83512 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 17 Jan 2014 10:11:52 +0000
+Subject: [PATCH 2/3] various header include fixes for building with musl libc
+
+we need:
+ sys/stat.h for mode_t
+ limits.h for PATH_MAX
+---
+ src/textfile.h | 2 ++
+ tools/csr_usb.c | 1 +
+ tools/hid2hci.c | 1 +
+ 3 files changed, 4 insertions(+)
+
+diff --git a/src/textfile.h b/src/textfile.h
+index b779bd2..e26da5d 100644
+--- a/src/textfile.h
++++ b/src/textfile.h
+@@ -24,6 +24,8 @@
+ #ifndef __TEXTFILE_H
+ #define __TEXTFILE_H
+
++#include <sys/stat.h>
++
+ int create_file(const char *filename, const mode_t mode);
+ int create_name(char *buf, size_t size, const char *path,
+ const char *address, const char *name);
+diff --git a/tools/csr_usb.c b/tools/csr_usb.c
+index a483bc1..5fb6bdc 100644
+--- a/tools/csr_usb.c
++++ b/tools/csr_usb.c
+@@ -33,6 +33,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/ioctl.h>
+
+ #include "csr.h"
+diff --git a/tools/hid2hci.c b/tools/hid2hci.c
+index 95b4abf..2dbfca7 100644
+--- a/tools/hid2hci.c
++++ b/tools/hid2hci.c
+@@ -35,6 +35,7 @@
+ #include <string.h>
+ #include <dirent.h>
+ #include <getopt.h>
++#include <limits.h>
+ #include <sys/ioctl.h>
+ #include <linux/types.h>
+ #include <linux/hiddev.h>
+--
+1.8.5.3
+
diff --git a/main/bluez/0003-unit-prevent-use-of-glibc-s-error-3.patch b/main/bluez/0003-unit-prevent-use-of-glibc-s-error-3.patch
new file mode 100644
index 0000000000..7a9a9a9ff0
--- /dev/null
+++ b/main/bluez/0003-unit-prevent-use-of-glibc-s-error-3.patch
@@ -0,0 +1,34 @@
+From 91e3e5dee411d4af864cc81e108e0e75c1d7e846 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 17 Jan 2014 10:39:16 +0000
+Subject: [PATCH 3/3] unit: prevent 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).
+
+This also fixes building on musl libc which misses the error(3) GNU
+extension.
+---
+ unit/test-sdp.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/unit/test-sdp.c b/unit/test-sdp.c
+index 6d699e2..eeed0cb 100644
+--- a/unit/test-sdp.c
++++ b/unit/test-sdp.c
+@@ -134,6 +134,12 @@ void btd_debug(const char *format, ...)
+ {
+ }
+
++void error(const char *format, ...);
++
++void error(const char *format, ...)
++{
++}
++
+ static void context_quit(struct context *context)
+ {
+ g_main_loop_quit(context->main_loop);
+--
+1.8.5.3
+
diff --git a/main/bluez/APKBUILD b/main/bluez/APKBUILD
index a05525c49c..d4b72ff087 100644
--- a/main/bluez/APKBUILD
+++ b/main/bluez/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=5.13
-pkgrel=0
+pkgrel=1
pkgdesc="Tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
arch="all"
@@ -13,10 +13,13 @@ 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
- bluetooth.initd
- rfcomm.initd
- rfcomm.confd
- "
+ 0001-bnep-avoid-use-of-caddr_t.patch
+ 0002-various-header-include-fixes-for-building-with-musl-.patch
+ 0003-unit-prevent-use-of-glibc-s-error-3.patch
+ bluetooth.initd
+ rfcomm.initd
+ rfcomm.confd
+ "
_builddir="$srcdir"/bluez-$pkgver
prepare() {
@@ -71,14 +74,23 @@ hid2hci() {
}
md5sums="c68f8cb270110256a684403ee43b5f79 bluez-5.13.tar.xz
+fb06db3798d26e6c443569415935f2d9 0001-bnep-avoid-use-of-caddr_t.patch
+f82f9f649cba62fef728fec5be24d8f7 0002-various-header-include-fixes-for-building-with-musl-.patch
+4420901a298a935b1619bf2d0cd834b9 0003-unit-prevent-use-of-glibc-s-error-3.patch
7a5611fa2cf42da2e844f96b2efa9f3b bluetooth.initd
7672edb8e33c4495ee9febb9864feb10 rfcomm.initd
7f4bb093adb0f519c621f2ea68712f35 rfcomm.confd"
sha256sums="4581beedde485246b16e2b4665d60f3fe041284b5d5afc3a0a818604ad525ad3 bluez-5.13.tar.xz
+b923cd59e639bac2b59ea40b29c95aaa4b5d741317fc76b25b37ead614fe65cd 0001-bnep-avoid-use-of-caddr_t.patch
+bbec3ba7559d8382f64aaae77c26fdca9c702d4a6a6d79d2420c9c76efd7fa3f 0002-various-header-include-fixes-for-building-with-musl-.patch
+1f249b7f62215dee882bc0e1a8d9e9dfe743df348c32d0bb05b4e47bad48ab79 0003-unit-prevent-use-of-glibc-s-error-3.patch
d4aef203e184bef4284b3719268c91e07a1e3f84cbdea2ac8ab40a2617ac9186 bluetooth.initd
4430703a9bec9a9482416b2d24aa47492264768a0b61356b361bbc8b1229a83e rfcomm.initd
672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08 rfcomm.confd"
sha512sums="89b12cb2c94f2a01311d8c5e9d14cf7c4d4dc23138e1becd53c0e1b9eabe94ace15f5a8b6ed0b30902a78ea1857dffe37c3ce5a3920f1f51a624d024fe5fd075 bluez-5.13.tar.xz
+a2f6e21fb0285b4438a146260c1b0953b6623d0ab4040765f2e2d342934390180e4ce2ae0c55a994052bf2c489152d259691a2053a8cbbfe6d66e8af5849592b 0001-bnep-avoid-use-of-caddr_t.patch
+c5916edb49970faa06233b663f76cfce66ce0b65498c9a3200a399e2a26d3fe89efdd3da69a50e9d94d971ecf4b8868048a7fb8af40ec64d51231eca4018a7cf 0002-various-header-include-fixes-for-building-with-musl-.patch
+d70ebb4ff90a39d91d2ddc04f94c96a50c202c8a4c1c7bc6e84c5c507c580b6973a31337a81ad149068d58017135ed906106cc5fafff0edc883c565f0afc61d8 0003-unit-prevent-use-of-glibc-s-error-3.patch
2c13cde6561c5aa8b2f27306851458966c67853f6ac2358d09019fda14d3d8e3ff6d9f1c90512c67063d1e1954ec05bf117c5fafc7716446cc5786e9cc12c49f bluetooth.initd
8f14b4e05c9ecaf4586ed2fdc2d2519de6b613de62ae5c95508baa682630f3112c5b6db6850f76679afc49e06f2ad035d148fa30b9b980747b6fb423f7bebe88 rfcomm.initd
a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb rfcomm.confd"