Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2023 07:19:27 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1397fea20826 - main - devel/py-ddtrace: Fix build with Clang 15 and remove the workaround
Message-ID:  <202306300719.35U7JRwd066179@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1397fea2082658965bb3255f1c0a2d621b00ab2b

commit 1397fea2082658965bb3255f1c0a2d621b00ab2b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-06-30 07:03:25 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-06-30 07:03:25 +0000

    devel/py-ddtrace: Fix build with Clang 15 and remove the workaround
    
    ddtrace/vendor/psutil/arch/freebsd/sys_socks.c:178:40: error: incompatible integer to pointer conversion passing 'kvaddr_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
            xf = psutil_get_file_from_sock(so->xso_so);
                                           ^~~~~~~~~~
    ddtrace/vendor/psutil/arch/freebsd/sys_socks.c:61:33: note: passing argument to parameter 'sock' here
    psutil_get_file_from_sock(void *sock) {
                                    ^
    ddtrace/vendor/psutil/arch/freebsd/sys_socks.c:298:40: error: incompatible integer to pointer conversion passing 'kvaddr_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
            xf = psutil_get_file_from_sock(xup->xu_socket.xso_so);
                                           ^~~~~~~~~~~~~~~~~~~~~
    ddtrace/vendor/psutil/arch/freebsd/sys_socks.c:61:33: note: passing argument to parameter 'sock' here
    psutil_get_file_from_sock(void *sock) {
                                    ^
    1 warning and 2 errors generated.
---
 devel/py-ddtrace/Makefile            |  6 ------
 devel/py-ddtrace/files/patch-clang15 | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/devel/py-ddtrace/Makefile b/devel/py-ddtrace/Makefile
index d154255a634e..55c9303a1d3d 100644
--- a/devel/py-ddtrace/Makefile
+++ b/devel/py-ddtrace/Makefile
@@ -38,12 +38,6 @@ OPENTRACING_DESC=	OpenTracing support
 
 OPENTRACING_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}opentracing>=2.0.0:devel/py-opentracing@${PY_FLAVOR}
 
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ((${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000) || ${OSVERSION} >= 1400079)
-CFLAGS+=	-Wno-error=int-conversion
-.endif
-
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
diff --git a/devel/py-ddtrace/files/patch-clang15 b/devel/py-ddtrace/files/patch-clang15
new file mode 100644
index 000000000000..e65d3f2c72a8
--- /dev/null
+++ b/devel/py-ddtrace/files/patch-clang15
@@ -0,0 +1,20 @@
+--- ddtrace/vendor/psutil/arch/freebsd/sys_socks.c.orig	2023-06-01 14:26:07 UTC
++++ ddtrace/vendor/psutil/arch/freebsd/sys_socks.c
+@@ -175,7 +175,7 @@ int psutil_gather_inet(int proto, PyObject *py_retlist
+ 
+         char lip[200], rip[200];
+ 
+-        xf = psutil_get_file_from_sock(so->xso_so);
++        xf = psutil_get_file_from_sock((void *) so->xso_so);
+         if (xf == NULL)
+             continue;
+         lport = ntohs(inp->inp_lport);
+@@ -295,7 +295,7 @@ int psutil_gather_unix(int proto, PyObject *py_retlist
+         if (xup->xu_len != sizeof *xup)
+             goto error;
+ 
+-        xf = psutil_get_file_from_sock(xup->xu_socket.xso_so);
++        xf = psutil_get_file_from_sock((void *) xup->xu_socket.xso_so);
+         if (xf == NULL)
+             continue;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306300719.35U7JRwd066179>