Kaydet (Commit) ec926509 authored tarafından Matt Fleming's avatar Matt Fleming

Allow socketmodule to compile on NetBSD -current, whose bluetooth API

differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
üst 9315251f
......@@ -203,6 +203,7 @@ Vincent Fiack
Russell Finn
Nils Fischbeck
Frederik Fix
Matt Fleming
Hernn Martnez 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment