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 ...@@ -203,6 +203,7 @@ Vincent Fiack
Russell Finn Russell Finn
Nils Fischbeck Nils Fischbeck
Frederik Fix Frederik Fix
Matt Fleming
Hernn Martnez Foffani Hernn Martnez Foffani
Doug Fort Doug Fort
John Fouhy John Fouhy
......
...@@ -132,6 +132,9 @@ Extension Modules ...@@ -132,6 +132,9 @@ Extension Modules
methods now allow their database parameter to be None as the methods now allow their database parameter to be None as the
sleepycat API allows. sleepycat API allows.
- Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
bluetooth API compared with Linux and FreeBSD.
Tests Tests
----- -----
......
...@@ -367,6 +367,14 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); ...@@ -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_SOCKADDR_MEMB(s, proto) &((s)->sock_addr)
#define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb) #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb)
#define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##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 #else
#define _BT_SOCKADDR_MEMB(s, proto) (&((s)->sock_addr).bt_##proto) #define _BT_SOCKADDR_MEMB(s, proto) (&((s)->sock_addr).bt_##proto)
#define _BT_L2_MEMB(sa, memb) ((sa)->l2_##memb) #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