bitcoin/depends/packages
merge-script 713bf66b1f
Merge bitcoin/bitcoin#31500: depends: Fix compiling libevent package on NetBSD
f89f16846e depends: Fix compiling `libevent` package on NetBSD (Hennadii Stepanov)

Pull request description:

  Libevent [introduced](https://github.com/libevent/libevent/pull/909) the [`typeof`](https://gcc.gnu.org/onlinedocs/gcc/Typeof.html) C language extension in the NetBSD-specific code, which was pulled into our depends in https://github.com/bitcoin/bitcoin/pull/21991.

  However, GCC [states](https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html):
  > the various `-std` options disable certain keywords.

  Due to our use of b042c4f053/depends/hosts/netbsd.mk (L1)

  the `typeof` keyword is disabled, resulting in a compilation error:
  ```
  $ gmake -C depends libevent CC=/usr/pkg/gcc14/bin/gcc CXX=/usr/pkg/gcc14/bin/g++
  <snip>
  [ 37%] Building C object CMakeFiles/event_core_static.dir/kqueue.c.o
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c: In function 'kq_setup_kevent':
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:56:27: error: implicit declaration of function 'typeof' [-Wimplicit-function-declaration]
     56 | #define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
        |                           ^~~~~~
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:190:30: note: in expansion of macro 'INT_TO_UDATA'
    190 |                 out->udata = INT_TO_UDATA(ADD_UDATA);
        |                              ^~~~~~~~~~~~
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:56:64: error: expected expression before 'intptr_t'
     56 | #define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
        |                                                                ^~~~~~~~
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:190:30: note: in expansion of macro 'INT_TO_UDATA'
    190 |                 out->udata = INT_TO_UDATA(ADD_UDATA);
        |                              ^~~~~~~~~~~~
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:56:27: error: called object is not a function or function pointer
     56 | #define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
        |                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/libevent/2.1.12-stable-ca6b96ec97c/kqueue.c:190:30: note: in expansion of macro 'INT_TO_UDATA'
    190 |                 out->udata = INT_TO_UDATA(ADD_UDATA);
        |                              ^~~~~~~~~~~~
  gmake[3]: *** [CMakeFiles/event_core_static.dir/build.make:328: CMakeFiles/event_core_static.dir/kqueue.c.o] Error 1
  <snip>
  ```

  This PR resolves this issue by following GCC's [recommendation](https://gcc.gnu.org/onlinedocs/gcc/Typeof.html):
  > write `__typeof__` instead of `typeof`.

ACKs for top commit:
  fanquake:
    ACK f89f16846e

Tree-SHA512: c0d2e535408db120535781f8518c616b0f5a39b1c6babb2a74e8e0565348aaf00b0f5a93cac0af7cf6d6bf028d5d58763fe71b3969ed9c7059fa7c3dca9d084c
2025-02-12 16:38:24 +01:00
..
bdb.mk depends: always configure with --with-pic 2024-03-14 15:41:17 +00:00
boost.mk depends: Update Boost download link 2024-06-03 09:49:34 +01:00
capnp.mk depends: Avoid using the -ffile-prefix-map compiler option 2025-02-05 14:36:48 +00:00
expat.mk depends: switch to building expat with CMake 2024-07-23 15:37:01 +01:00
fontconfig.mk depends: better cleanup after fontconfig 2024-11-14 11:32:47 +00:00
freetype.mk depends: Cleanup postprocess commands after switching to CMake 2024-07-25 11:59:18 +01:00
libevent.mk Merge bitcoin/bitcoin#31500: depends: Fix compiling libevent package on NetBSD 2025-02-12 16:38:24 +01:00
libmultiprocess.mk depends: Avoid using the -ffile-prefix-map compiler option 2025-02-05 14:36:48 +00:00
libXau.mk depends: switch libXau to .tar.gz 2024-04-19 13:01:09 +01:00
libxcb.mk libxcb: use a patch instead of sed 2022-07-29 14:02:23 +01:00
libxcb_util.mk depends: switch libxcb_util to .tar.gz 2024-04-19 13:01:09 +01:00
libxcb_util_image.mk depends: switch libxcb_util_image to .tar.gz 2024-04-19 13:01:10 +01:00
libxcb_util_keysyms.mk depends: switch libxcb_util_keysyms to .tar.gz 2024-04-19 13:01:10 +01:00
libxcb_util_render.mk depends: switch libxcb_util_render to .tar.gz 2024-04-19 13:01:10 +01:00
libxcb_util_wm.mk depends: switch libxcb_util_wm to .tar.gz 2024-04-19 13:01:10 +01:00
libxkbcommon.mk build: suppress array-bounds errors in libxkbcommon 2022-06-23 17:29:31 +01:00
native_capnp.mk depends: Update capnproto to 1.1.0 2024-12-21 17:39:19 +00:00
native_libmultiprocess.mk depends: Update libmultiprocess library before converting to subtree 2025-01-26 14:13:47 -05:00
packages.mk depends: drop miniupnpc 2024-10-25 09:27:30 -04:00
qrencode.mk depends: cleanup after qrencode build 2024-07-25 12:02:48 +01:00
qt.mk depends: Qt 5.15.16 2025-01-15 11:52:27 +00:00
sqlite.mk depends: drop sqlite pkgconfig file 2024-11-14 13:39:08 +00:00
systemtap.mk Revert "depends: systemtap: remove variadic params that trigger compiler warnings" 2024-01-04 17:11:37 +00:00
xcb_proto.mk depends: xcb-proto 1.15.2 2023-07-18 11:27:24 +01:00
xproto.mk depends: switch xproto to .tar.gz 2024-04-19 13:01:09 +01:00
zeromq.mk depends: Avoid using the -ffile-prefix-map compiler option 2025-02-05 14:36:48 +00:00