mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-132734: Fix build on FreeBSD and old Linux (GH-132829)
This commit is contained in:
parent
6430c634da
commit
d7be26a71e
2 changed files with 18 additions and 9 deletions
|
@ -2647,14 +2647,13 @@ class BasicBluetoothTest(unittest.TestCase):
|
|||
socket.BT_POWER
|
||||
socket.BT_CHANNEL_POLICY
|
||||
socket.BT_CHANNEL_POLICY_BREDR_ONLY
|
||||
socket.BT_PHY
|
||||
socket.BT_PHY_BR_1M_1SLOT
|
||||
socket.BT_MODE
|
||||
socket.BT_MODE_BASIC
|
||||
socket.BT_VOICE
|
||||
socket.BT_VOICE_TRANSPARENT
|
||||
socket.BT_VOICE_CVSD_16BIT
|
||||
socket.BT_CODEC
|
||||
if hasattr(socket, 'BT_PHY'):
|
||||
socket.BT_PHY_BR_1M_1SLOT
|
||||
if hasattr(socket, 'BT_MODE'):
|
||||
socket.BT_MODE_BASIC
|
||||
if hasattr(socket, 'BT_VOICE'):
|
||||
socket.BT_VOICE_TRANSPARENT
|
||||
socket.BT_VOICE_CVSD_16BIT
|
||||
socket.L2CAP_LM
|
||||
socket.L2CAP_LM_MASTER
|
||||
socket.L2CAP_LM_AUTH
|
||||
|
|
|
@ -208,7 +208,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
|
|||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BLUETOOTH_H
|
||||
#if defined(HAVE_BLUETOOTH_H) && !defined(__FreeBSD__)
|
||||
# include <netbt/l2cap.h>
|
||||
# include <netbt/rfcomm.h>
|
||||
# include <netbt/hci.h>
|
||||
|
@ -8014,6 +8014,7 @@ socket_exec(PyObject *m)
|
|||
#endif
|
||||
ADD_INT_MACRO(m, BT_SNDMTU);
|
||||
ADD_INT_MACRO(m, BT_RCVMTU);
|
||||
#ifdef BT_PHY
|
||||
ADD_INT_MACRO(m, BT_PHY);
|
||||
ADD_INT_MACRO(m, BT_PHY_BR_1M_1SLOT);
|
||||
ADD_INT_MACRO(m, BT_PHY_BR_1M_3SLOT);
|
||||
|
@ -8030,15 +8031,24 @@ socket_exec(PyObject *m)
|
|||
ADD_INT_MACRO(m, BT_PHY_LE_2M_RX);
|
||||
ADD_INT_MACRO(m, BT_PHY_LE_CODED_TX);
|
||||
ADD_INT_MACRO(m, BT_PHY_LE_CODED_RX);
|
||||
#endif
|
||||
#ifdef BT_MODE
|
||||
ADD_INT_MACRO(m, BT_MODE);
|
||||
ADD_INT_MACRO(m, BT_MODE_BASIC);
|
||||
ADD_INT_MACRO(m, BT_MODE_ERTM);
|
||||
ADD_INT_MACRO(m, BT_MODE_STREAMING);
|
||||
ADD_INT_MACRO(m, BT_MODE_LE_FLOWCTL);
|
||||
ADD_INT_MACRO(m, BT_MODE_EXT_FLOWCTL);
|
||||
#endif
|
||||
#ifdef BT_PKT_STATUS
|
||||
ADD_INT_MACRO(m, BT_PKT_STATUS);
|
||||
#endif
|
||||
#ifdef BT_ISO_QOS
|
||||
ADD_INT_MACRO(m, BT_ISO_QOS);
|
||||
#endif
|
||||
#ifdef BT_CODEC
|
||||
ADD_INT_MACRO(m, BT_CODEC);
|
||||
#endif
|
||||
#endif /* HAVE_BLUETOOTH_BLUETOOTH_H */
|
||||
#endif /* USE_BLUETOOTH */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue