git: 4d84480d7a68 - main - lang/python312: fix recvfrom() and sendto() on divert(4) socket
Date: Fri, 25 Sep 2026 20:53:22 UTC
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4d84480d7a685fe3528954f7fb2379249102b694
commit 4d84480d7a685fe3528954f7fb2379249102b694
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-09-01 19:42:57 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2026-09-25 20:53:07 +0000
lang/python312: fix recvfrom() and sendto() on divert(4) socket
This is backport of upstream 05406b221dc that will be available in 3.13.
---
lang/python312/Makefile | 1 +
lang/python312/files/patch-Modules__socketmodule.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/lang/python312/Makefile b/lang/python312/Makefile
index 718dd9a55e67..c5415b4d1cce 100644
--- a/lang/python312/Makefile
+++ b/lang/python312/Makefile
@@ -1,5 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
diff --git a/lang/python312/files/patch-Modules__socketmodule.c b/lang/python312/files/patch-Modules__socketmodule.c
new file mode 100644
index 000000000000..30d277760692
--- /dev/null
+++ b/lang/python312/files/patch-Modules__socketmodule.c
@@ -0,0 +1,14 @@
+--- Modules/socketmodule.c
++++ Modules/socketmodule.c
+@@ -2656,6 +2656,11 @@
+ /* RDS sockets use sockaddr_in: fall-through */
+ #endif /* AF_RDS */
+
++#ifdef AF_DIVERT
++ case AF_DIVERT:
++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */
++#endif /* AF_DIVERT */
++
+ case AF_INET:
+ {
+ *len_ret = sizeof (struct sockaddr_in);