pacho       14/10/11 11:00:50

  Added:                bluez-5.24-musl-compat.patch
  Log:
  Version bump, fix compat with musl (#524454 by Anthony Basile), install 
gatttool (#524640 by Jason Zaman), install hex2hcd (by amak79).
  
  (Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 
A188FBD4)

Revision  Changes    Path
1.1                  net-wireless/bluez/files/bluez-5.24-musl-compat.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/bluez/files/bluez-5.24-musl-compat.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/bluez/files/bluez-5.24-musl-compat.patch?rev=1.1&content-type=text/plain

Index: bluez-5.24-musl-compat.patch
===================================================================
>From 57c33317f5c3f6d21a9b3c56f8d1e97179e4c457 Mon Sep 17 00:00:00 2001
From: "Anthony G. Basile" <bluen...@gentoo.org>
Date: Sat, 4 Oct 2014 09:34:05 -0400
Subject: [PATCH] emulator/serial.c: use posix_openpt() instead of getpt()

getpt(3) is glibc-specific and is not provided on musl. Instead, we
use use posix_openpt(3) which is equivalent and portable.

Signed-off-by: Anthony G. Basile <bluen...@gentoo.org>
---
 emulator/serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emulator/serial.c b/emulator/serial.c
index 9583be4..8b49dc6 100644
--- a/emulator/serial.c
+++ b/emulator/serial.c
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <fcntl.h>
 #include <sys/param.h>
 #include <sys/epoll.h>
 #include <sys/uio.h>
@@ -160,7 +161,7 @@ static void open_pty(struct serial *serial)
 {
        enum btdev_type uninitialized_var(type);
 
-       serial->fd = getpt();
+       serial->fd = posix_openpt(O_RDWR | O_NOCTTY);
        if (serial->fd < 0) {
                perror("Failed to get master pseudo terminal");
                return;
-- 
2.0.4





Reply via email to