[socket/_socket] Restore bluetooth socket constants on Linux (#15209)

This commit is contained in:
Stephen Morton
2026-01-19 06:56:32 -08:00
committed by GitHub
parent 2bcf7bb270
commit cc24a838fc
3 changed files with 19 additions and 8 deletions
+4 -4
View File
@@ -587,7 +587,7 @@ if sys.platform != "linux":
has_ipv6: bool
if sys.platform != "darwin" and sys.platform != "linux":
if sys.platform != "darwin":
BDADDR_ANY: Final = "00:00:00:00:00:00"
BDADDR_LOCAL: Final = "00:00:00:FF:FF:FF"
@@ -660,16 +660,16 @@ if sys.platform == "darwin":
PF_SYSTEM: Final[int]
SYSPROTO_CONTROL: Final[int]
if sys.platform != "darwin" and sys.platform != "linux":
if sys.platform != "darwin":
AF_BLUETOOTH: Final[int]
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
if sys.platform != "win32" and sys.platform != "darwin":
# Linux and some BSD support is explicit in the docs
# Windows and macOS do not support in practice
BTPROTO_HCI: Final[int]
BTPROTO_L2CAP: Final[int]
BTPROTO_SCO: Final[int] # not in FreeBSD
if sys.platform != "darwin" and sys.platform != "linux":
if sys.platform != "darwin":
BTPROTO_RFCOMM: Final[int]
if sys.platform == "linux":