Wed Oct 4 13:19:49 2023 UTC ()
python312: Fix socket module on SunOS.


(jperkin)
diff -r1.1 -r1.2 pkgsrc/lang/python312/distinfo
diff -r1.1 -r1.2 pkgsrc/lang/python312/patches/patch-Modules_socketmodule.c

cvs diff -r1.1 -r1.2 pkgsrc/lang/python312/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/python312/distinfo 2023/10/02 20:07:14 1.1
+++ pkgsrc/lang/python312/distinfo 2023/10/04 13:19:49 1.2
@@ -1,12 +1,12 @@ @@ -1,12 +1,12 @@
1$NetBSD: distinfo,v 1.1 2023/10/02 20:07:14 adam Exp $ 1$NetBSD: distinfo,v 1.2 2023/10/04 13:19:49 jperkin Exp $
2 2
3BLAKE2s (Python-3.12.0.tar.xz) = d99d0b678e02814643fcf2977b1a85992441e78c88c5624b7d5ed9d50e72c82c 3BLAKE2s (Python-3.12.0.tar.xz) = d99d0b678e02814643fcf2977b1a85992441e78c88c5624b7d5ed9d50e72c82c
4SHA512 (Python-3.12.0.tar.xz) = 4d5353151fd1dad80fe96bd2a668cec27287a0dad85086239597166f8189d4edf6c4800ed14f39c8e54816076fec13ba405d6bfa1123ad2dada8cf85c60025e6 4SHA512 (Python-3.12.0.tar.xz) = 4d5353151fd1dad80fe96bd2a668cec27287a0dad85086239597166f8189d4edf6c4800ed14f39c8e54816076fec13ba405d6bfa1123ad2dada8cf85c60025e6
5Size (Python-3.12.0.tar.xz) = 20575020 bytes 5Size (Python-3.12.0.tar.xz) = 20575020 bytes
6SHA1 (patch-Include_pymacro.h) = 271a891892dca1a3aaa3bedcae626a68a36cae0b 6SHA1 (patch-Include_pymacro.h) = 271a891892dca1a3aaa3bedcae626a68a36cae0b
7SHA1 (patch-Lib_ctypes_util.py) = 3dec1b6b7a36e46cbfa0dfcd71c5e7fac9f60764 7SHA1 (patch-Lib_ctypes_util.py) = 3dec1b6b7a36e46cbfa0dfcd71c5e7fac9f60764
8SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390 8SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390
9SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f 9SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f
10SHA1 (patch-Makefile.pre.in) = 03403a42fc77e4d244fe22335563927f97be6980 10SHA1 (patch-Makefile.pre.in) = 03403a42fc77e4d244fe22335563927f97be6980
11SHA1 (patch-Modules_socketmodule.c) = dcf93806374bb8d983b7c8cefd7a3360a90064d7 11SHA1 (patch-Modules_socketmodule.c) = 87e02460d54a6879e1e5a3029ad1068909f63961
12SHA1 (patch-configure) = dee9b26930232c58f0edff884a94031c014387e5 12SHA1 (patch-configure) = dee9b26930232c58f0edff884a94031c014387e5

cvs diff -r1.1 -r1.2 pkgsrc/lang/python312/patches/patch-Modules_socketmodule.c (expand / switch to unified diff)

--- pkgsrc/lang/python312/patches/patch-Modules_socketmodule.c 2023/10/02 20:07:15 1.1
+++ pkgsrc/lang/python312/patches/patch-Modules_socketmodule.c 2023/10/04 13:19:49 1.2
@@ -1,13 +1,25 @@ @@ -1,13 +1,25 @@
1$NetBSD: patch-Modules_socketmodule.c,v 1.1 2023/10/02 20:07:15 adam Exp $ 1$NetBSD: patch-Modules_socketmodule.c,v 1.2 2023/10/04 13:19:49 jperkin Exp $
2 2
3--- Modules/socketmodule.c.orig 2022-01-13 18:52:14.000000000 +0000 3SunOS needs _XOPEN_SOURCE for sendmsg bits that are now required.
 4
 5--- Modules/socketmodule.c.orig 2023-10-02 11:48:14.000000000 +0000
4+++ Modules/socketmodule.c 6+++ Modules/socketmodule.c
5@@ -5440,7 +5440,7 @@ socket_sethostname(PyObject *self, PyObj 7@@ -89,6 +89,9 @@ Local naming conventions:
 8 # define Py_BUILD_CORE_MODULE 1
 9 #endif
 10
 11+#ifdef __sun
 12+#define _XOPEN_SOURCE 600
 13+#endif
 14 #ifdef __APPLE__
 15 // Issue #35569: Expose RFC 3542 socket options.
 16 #define __APPLE_USE_RFC_3542 1
 17@@ -5655,7 +5658,7 @@ socket_sethostname(PyObject *self, PyObj
6 Py_buffer buf; 18 Py_buffer buf;
7 int res, flag = 0; 19 int res, flag = 0;
8  20
9-#ifdef _AIX 21-#ifdef _AIX
10+#if defined(_AIX) || (defined(__sun) && PKGSRC_OPSYS_VERSION < 051100) 22+#if defined(_AIX) || (defined(__sun) && PKGSRC_OPSYS_VERSION < 051100)
11 /* issue #18259, not declared in any useful header file */ 23 /* issue #18259, not declared in any useful header file */
12 extern int sethostname(const char *, size_t); 24 extern int sethostname(const char *, size_t);
13 #endif 25 #endif