Ping. On Sun, 4 Apr 2021 00:14:56 +0200 Charlene Wendling <juliana...@posteo.jp> wrote:
> Hi, > > > http://build-failures.rhaalovely.net/powerpc/2021-03-11/comms/sigrok/pulseview.log > > http://build-failures.rhaalovely.net/powerpc/2021-03-11/comms/sigrok/sigrok-cli.log > > http://build-failures.rhaalovely.net/sparc64/2021-03-31/comms/sigrok/pulseview.log > > http://build-failures.rhaalovely.net/sparc64/2021-03-31/comms/sigrok/sigrok-cli.log > > It looks like it happens because our usbhid defines hid_init(3), > but the libhidapi's one must be used instead. As mentioned in > comms/libhidapi/patches/patch-hidapi_hidapi_h, we should use > hidapi_hid_init(). > > That diff fixes the concerned libsigrok [0] consumers' build [1] [2] > on macppc, and amd64 is still fine. > > As far as macppc go, i may not be able to apply this patch for the > current bulk. > > Comments/feedback are welcome, > > Charlène. > > > [0] https://bin.charlenew.xyz/libsigrok.log > [1] https://bin.charlenew.xyz/sigrok-cli.log > [2] https://bin.charlenew.xyz/pulseview.log Index: Makefile =================================================================== RCS file: /cvs/ports/comms/sigrok/libsigrok/Makefile,v retrieving revision 1.11 diff -u -p -u -p -r1.11 Makefile --- Makefile 6 Mar 2021 22:42:43 -0000 1.11 +++ Makefile 11 Apr 2021 13:49:35 -0000 @@ -5,7 +5,7 @@ COMMENT = sigrok hardware driver librar SIGROK_PROJECT = libsigrok SIGROK_VERSION = 0.5.2 MODPY_EGG_VERSION = ${SIGROK_VERSION} -REVISION = 0 +REVISION = 1 SHARED_LIBS += sigrok 0.1 # 0.0 SHARED_LIBS += sigrokcxx 0.1 # 4.0 Index: patches/patch-src_backend_c =================================================================== RCS file: patches/patch-src_backend_c diff -N patches/patch-src_backend_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_backend_c 11 Apr 2021 13:49:35 -0000 @@ -0,0 +1,22 @@ +$OpenBSD$ + +Fix for: +src/backend.c:613:6: warning: implicit declaration of function 'hid_init' +is invalid in C99 +On ld.bfd arches, this led to undefined references at build time. + +It appears that comms/libhidapi redefines hid_init(3) to hidapi_hid_init(). + +Index: src/backend.c +--- src/backend.c.orig ++++ src/backend.c +@@ -23,6 +23,9 @@ + #ifdef _WIN32 + #include <winsock2.h> + #endif ++#ifdef __OpenBSD__ ++#define hid_init hidapi_hid_init ++#endif + #include <libsigrok/libsigrok.h> + #include "libsigrok-internal.h" +