Allow socketmodule to compile on NetBSD -current, whose bluetooth API
differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
This commit is contained in:
parent
9315251fb6
commit
ec9265094a
|
@ -203,6 +203,7 @@ Vincent Fiack
|
|||
Russell Finn
|
||||
Nils Fischbeck
|
||||
Frederik Fix
|
||||
Matt Fleming
|
||||
Hernán Martínez Foffani
|
||||
Doug Fort
|
||||
John Fouhy
|
||||
|
|
|
@ -132,6 +132,9 @@ Extension Modules
|
|||
methods now allow their database parameter to be None as the
|
||||
sleepycat API allows.
|
||||
|
||||
- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
|
||||
bluetooth API compared with Linux and FreeBSD.
|
||||
|
||||
Tests
|
||||
-----
|
||||
|
||||
|
|
|
@ -367,6 +367,14 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
|||
#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr)
|
||||
#define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb)
|
||||
#define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb)
|
||||
#elif defined(__NetBSD__)
|
||||
#define sockaddr_l2 sockaddr_bt
|
||||
#define sockaddr_rc sockaddr_bt
|
||||
#define sockaddr_sco sockaddr_bt
|
||||
#define _BT_SOCKADDR_MEMB(s, proto) &((s)->sock_addr)
|
||||
#define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb)
|
||||
#define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb)
|
||||
#define _BT_SCO_MEMB(sa, memb) ((sa)->bt_##memb)
|
||||
#else
|
||||
#define _BT_SOCKADDR_MEMB(s, proto) (&((s)->sock_addr).bt_##proto)
|
||||
#define _BT_L2_MEMB(sa, memb) ((sa)->l2_##memb)
|
||||
|
|
Loading…
Reference in New Issue