Reporting this as a Libgpg-error bug due it seemingly related to changes in Libgpg-error 1.46 specifically to src/estream.c (addition of new SOCKET based I/O in lines 1190-1393). Attempting to build GnuPG 2.2.40 LTS against the new Libgpg-error 1.46 gives a link failure as follows:
i686-w64-mingw32-gcc -I/usr/i686-w64-mingw32/include -I/usr/i686-w64-mingw32/include -I/usr/i686-w64-mingw32/include -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -g -Os -Xlinker --no-insert-timestamp -static -o gpgv.exe gpgv.o build-packet.o compress.o free-packet.o getkey.o keydb.o keyring.o seskey.o kbnode.o mainproc.o armor.o mdfilter.o textfilter.o progress.o misc.o rmd160.o openfile.o keyid.o parse-packet.o cpr.o plaintext.o sig-check.o keylist.o pkglue.o ecdh.o verify.o ../kbx/libkeybox.a ../common/libcommon.a ../regexp/libregexp.a ../common/libgpgrl.a -lz -lws2_32 -L/usr/i686-w64-mingw32/lib -lgcrypt -L/usr/i686-w64-mingw32/lib -lgpg-error gpgv-w32info.o /usr/bin/i686-w64-mingw32-ld: /usr/i686-w64-mingw32/lib/libgpg-error.a(libgpg_error_la-estream.o): in function `func_sock_ioctl': ./build-i686-w64-mingw32/src/../../src/estream.c:1342: undefined reference to `_imp__ioctlsocket@12' collect2: error: ld returned 1 exit status
Build was attempted for Ubuntu 22.04 LTS Jammy, so the most recent Ubuntu LTS release available.