Annotation of pkgsrc/lang/python38/patches/patch-Modules_socketmodule.c, revision 1.2
1.2 ! jperkin 1: $NetBSD: patch-Modules_socketmodule.c,v 1.1 2019/10/15 16:50:11 adam Exp $
1.1 adam 2:
3: Support NetBSD's socketcan implementation
4:
1.2 ! jperkin 5: --- Modules/socketmodule.c.orig 2021-08-30 14:26:41.000000000 +0000
1.1 adam 6: +++ Modules/socketmodule.c
1.2 ! jperkin 7: @@ -5409,7 +5409,7 @@ socket_sethostname(PyObject *self, PyObj
! 8: Py_buffer buf;
! 9: int res, flag = 0;
! 10:
! 11: -#ifdef _AIX
! 12: +#if defined(_AIX) || (defined(__sun) && PKGSRC_OPSYS_VERSION < 051100)
! 13: /* issue #18259, not declared in any useful header file */
! 14: extern int sethostname(const char *, size_t);
! 15: #endif
! 16: @@ -7701,6 +7701,20 @@ PyInit__socket(void)
1.1 adam 17: PyModule_AddIntConstant(m, "CAN_BCM_CAN_FD_FRAME", CAN_FD_FRAME);
18: #endif
19: #endif
20: +#ifdef HAVE_NETCAN_CAN_H
21: + PyModule_AddIntMacro(m, CAN_EFF_FLAG);
22: + PyModule_AddIntMacro(m, CAN_RTR_FLAG);
23: + PyModule_AddIntMacro(m, CAN_ERR_FLAG);
24: +
25: + PyModule_AddIntMacro(m, CAN_SFF_MASK);
26: + PyModule_AddIntMacro(m, CAN_EFF_MASK);
27: + PyModule_AddIntMacro(m, CAN_ERR_MASK);
28: +
29: + PyModule_AddIntMacro(m, CAN_RAW_FILTER);
30: + /* PyModule_AddIntMacro(m, CAN_RAW_ERR_FILTER); */
31: + PyModule_AddIntMacro(m, CAN_RAW_LOOPBACK);
32: + PyModule_AddIntMacro(m, CAN_RAW_RECV_OWN_MSGS);
33: +#endif
34: #ifdef SOL_RDS
35: PyModule_AddIntMacro(m, SOL_RDS);
36: #endif
CVSweb <webmaster@jp.NetBSD.org>