gh-129719: Restore missing socket.CAN_RAW_ERR_FILTER on Linux (#129721)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
Jeroen Bogers 2025-04-18 21:59:37 +02:00 committed by GitHub
parent 741c6386b8
commit ce31ae5209
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View file

@ -498,6 +498,9 @@ Constants
.. versionchanged:: 3.11
NetBSD support was added.
.. versionchanged:: next
Restored missing ``CAN_RAW_ERR_FILTER`` on Linux.
.. data:: CAN_BCM
CAN_BCM_*

View file

@ -0,0 +1 @@
Fix missing :data:`!socket.CAN_RAW_ERR_FILTER` constant in the socket module on Linux systems. It was missing since Python 3.11.

View file

@ -8332,7 +8332,7 @@ socket_exec(PyObject *m)
#endif
#if defined(HAVE_LINUX_CAN_RAW_H) || defined(HAVE_NETCAN_CAN_H)
ADD_INT_MACRO(m, CAN_RAW_FILTER);
#ifdef CAN_RAW_ERR_FILTER
#ifdef HAVE_LINUX_CAN_RAW_H
ADD_INT_MACRO(m, CAN_RAW_ERR_FILTER);
#endif
ADD_INT_MACRO(m, CAN_RAW_LOOPBACK);