# Draft: uunicorn/wine — modern-toolchain build fixes **Where:** https://github.com/uunicorn/wine (branch `hacking/validiy-sensor`) **Type:** PR against the branch (or issue with the patch attached) **Attach:** `work/patches/uunicorn-wine-modern-toolchain.patch` (vs commit `7a69a82`) --- ## Title Build fixes for modern toolchains (GCC 14+, GnuTLS 3.8, OpenSSL 3) + working configure recipe ## Body Hi! I built this fork on a current distro (Arch, x86_64) instead of the Docker image and had to fix a handful of toolchain-drift errors. With the attached patch + the recipe below, the full build completes and the winusb stub works end-to-end — I used it to enroll and verify fingerprints against a real Synaptics **06cb:0081** (Lenovo YOGA 720-13IKB) via synaWudfBioUsb-sandbox. **Environment:** gcc 16.2.1, gnutls 3.8.13, openssl 3.6.5, x86_64-w64-mingw32-gcc 16.2.0 (PE side), base commit `7a69a82`. ### Fixes in the patch 1. **`dlls/bcrypt/gnutls.c`** — pointer depth with `gnutls_privkey_export_ecc_raw`. GCC 14+ promotes `-Wincompatible-pointer-types` to an error: `gnutls.c:1034:65: error: passing argument 2 of 'pgnutls_privkey_export_ecc_raw' from incompatible pointer type` → pass `curve` (not `&curve`). 2. **`dlls/bcrypt/secrets.c`** - `ECDSA_SIG_get0` takes `const BIGNUM **` with OpenSSL 3: `secrets.c:242:26: error: passing argument 2 of 'pECDSA_SIG_get0' from incompatible pointer type` - `get_gnutls_ecc_key_params` (defined in gnutls.c) needs a declaration — `implicit-function-declaration` is a hard error since GCC 14. 3. **`dlls/crypt32/crypt32_private.h`** — `HINSTANCE hInstance` needs `extern`; `-fno-common` is default since GCC 10 (hits as "multiple definition of `hInstance`"). ### Additional build-level accommodations - C23 `bool` is now a keyword, which collides with old code using `bool` as a struct/union member name (`dlls/msi/cond.y`, `programs/winhlp32/macro.h`). Neutralized with `-Dbool=winbool_field` in CFLAGS; alternatively disable those modules (`--disable-msi --disable-winhlp32`). - `-fcommon` keeps the old global-tentative-definition behavior (the crypt32 fix above is the surgical version of the same issue). ### Recipe that works ```sh ./configure --enable-win64 --with-gnutls --without-x --disable-tests \ --without-freetype --without-fontconfig --without-capi --without-dbus \ --without-oss --without-alsa --without-cups --without-sane --without-v4l \ --without-pcap --without-ldap --without-xml --without-xslt --without-mscms \ --disable-wmic --disable-winedbg --disable-winhlp32 \ CFLAGS='-g -O2 -Wno-error -fcommon -Dbool=winbool_field' make -j$(nproc) && make install ``` (The `--disable-wmic/--disable-winedbg/--disable-winhlp32` flags can be dropped once the `bool` workaround is in place; they just avoid unrelated legacy tool breakage. `mingw-w64-gcc` is required for the PE side.) Happy to split this up or adjust naming/style for the branch — let me know!