python37: Solaris 10 fixes, from pekdon via IRC.

This commit is contained in:
jperkin 2022-01-20 13:03:23 +00:00
parent 96c7d4bd72
commit e8ec79db80
3 changed files with 26 additions and 8 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.29 2022/01/12 08:49:01 wiz Exp $
# $NetBSD: Makefile,v 1.30 2022/01/20 13:03:23 jperkin Exp $
PKGREVISION= 3
.include "dist.mk"
@ -43,8 +43,17 @@ PKG_CC= clang
PKG_CXX= clang++
.endif
# Used in socketmodule.c to determine if a sethostname declaration is required
CPPFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=${OPSYS_VERSION}
# fdatasync()
LIBS.SunOS+= -lrt
.if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100
SUBST_CLASSES+= setup
SUBST_MESSAGE.setup= Replacing crypt with crypt_i
SUBST_STAGE.setup= pre-configure
SUBST_FILES.setup= setup.py
SUBST_SED.setup= -e "s,'crypt','crypt_i',"
.endif
PY_VER_SUFFIX= 3.7

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.30 2022/01/12 08:49:01 wiz Exp $
$NetBSD: distinfo,v 1.31 2022/01/20 13:03:23 jperkin Exp $
BLAKE2s (Python-3.7.12.tar.xz) = 74fece84e0ce91742bfcc2686d964158fe4d1f5c537e7be61e63d28d21efc495
SHA512 (Python-3.7.12.tar.xz) = e1a5942908c1d1469c0ab129fb4287d4ba6eb2a030e88fd71c043fe187a1bc86c00878dab29147199617a361a0c60d9e720fe3bc58bc7bc4cc8ec4bb50c7ea2a
@ -28,7 +28,7 @@ SHA1 (patch-Modules___decimal_libmpdec_mpdecimal.h) = 3840dc184f1f5faa590cdca57d
SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
SHA1 (patch-Modules_posixmodule.c) = cae3797179c1a4d820dd294b69ca4b9a6fa81899
SHA1 (patch-Modules_socketmodule.c) = c0bdb256bccc176c2406feec4080cd91fcb693b2
SHA1 (patch-Modules_socketmodule.c) = a40573541f299b155fb845ddab0350d28cd360c8
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Modules_timemodule.c) = e4be632485280002eb76a8e6e524676429044c15
SHA1 (patch-Python_bootstrap__hash.c) = c60b3987e549987a1180edaab0ad2d48fc272925

View file

@ -1,10 +1,10 @@
$NetBSD: patch-Modules_socketmodule.c,v 1.1 2018/07/03 03:55:40 adam Exp $
$NetBSD: patch-Modules_socketmodule.c,v 1.2 2022/01/20 13:03:23 jperkin Exp $
Support NetBSD's socketcan implementation
--- Modules/socketmodule.c.orig 2018-03-29 11:57:55.000000000 +0000
--- Modules/socketmodule.c.orig 2021-09-04 03:49:21.000000000 +0000
+++ Modules/socketmodule.c
@@ -1439,8 +1439,13 @@ makesockaddr(SOCKET_T sockfd, struct soc
@@ -1461,8 +1461,13 @@ makesockaddr(SOCKET_T sockfd, struct soc
/* need to look up interface name given index */
if (a->can_ifindex) {
ifr.ifr_ifindex = a->can_ifindex;
@ -18,7 +18,7 @@ Support NetBSD's socketcan implementation
}
switch (proto) {
@@ -2010,7 +2015,12 @@ getsockaddrarg(PySocketSockObject *s, Py
@@ -2032,7 +2037,12 @@ getsockaddrarg(PySocketSockObject *s, Py
} else if ((size_t)len < sizeof(ifr.ifr_name)) {
strncpy(ifr.ifr_name, PyBytes_AS_STRING(interfaceName), sizeof(ifr.ifr_name));
ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
@ -32,7 +32,16 @@ Support NetBSD's socketcan implementation
s->errorhandler();
Py_DECREF(interfaceName);
return 0;
@@ -7371,6 +7381,20 @@ PyInit__socket(void)
@@ -5218,7 +5228,7 @@ socket_sethostname(PyObject *self, PyObj
Py_buffer buf;
int res, flag = 0;
-#ifdef _AIX
+#if defined(_AIX) || (defined(__sun) && PKGSRC_OPSYS_VERSION < 051100)
/* issue #18259, not declared in any useful header file */
extern int sethostname(const char *, size_t);
#endif
@@ -7415,6 +7425,20 @@ PyInit__socket(void)
PyModule_AddIntConstant(m, "CAN_BCM_RX_TIMEOUT", RX_TIMEOUT);
PyModule_AddIntConstant(m, "CAN_BCM_RX_CHANGED", RX_CHANGED);
#endif