diff --git a/srcpkgs/wine/patches/musl-ns_name_skip.patch b/srcpkgs/wine/patches/musl-ns_name_skip.patch new file mode 100644 index 00000000000..3246959f9bb --- /dev/null +++ b/srcpkgs/wine/patches/musl-ns_name_skip.patch @@ -0,0 +1,48 @@ +diff --git a/dlls/dnsapi/libresolv.c b/dlls/dnsapi/libresolv.c +index ac52147..0f8c2ef 100644 +--- wine-6.6/dlls/dnsapi/libresolv.c ++++ wine-6.6/dlls/dnsapi/libresolv.c +@@ -57,6 +57,43 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(dnsapi); + ++/* code from glibc's resolv/ns_name.c, with errno setting removed */ ++/*% ++ * Advance *ptrptr to skip over the compressed name it points at. ++ * ++ * return: ++ *\li 0 on success, -1 (with errno set) on failure. ++ */ ++#ifndef __GLIBC__ ++static int ++ns_name_skip(const u_char **ptrptr, const u_char *eom) ++{ ++ const u_char *cp; ++ u_int n; ++ ++ cp = *ptrptr; ++ while (cp < eom && (n = *cp++) != 0) { ++ /* Check for indirection. */ ++ switch (n & NS_CMPRSFLGS) { ++ case 0: /*%< normal case, n == len */ ++ cp += n; ++ continue; ++ case NS_CMPRSFLGS: /*%< indirection */ ++ cp++; ++ break; ++ default: /*%< illegal type */ ++ return (-1); ++ } ++ break; ++ } ++ if (cp > eom) { ++ return (-1); ++ } ++ *ptrptr = cp; ++ return (0); ++} ++#endif ++ + static const char *debugstr_type( unsigned short type ) + { + const char *str; diff --git a/srcpkgs/wine/template b/srcpkgs/wine/template index 0fbe8f22637..5b0d64f18e2 100644 --- a/srcpkgs/wine/template +++ b/srcpkgs/wine/template @@ -64,10 +64,6 @@ if [ "$XBPS_LIBC" = "glibc" ]; then hostmakedepends+=" prelink" fi -if [ "$XBPS_LIBC" = "musl" ]; then - broken="undefined reference to `ns_name_skip'" -fi - _wine_libexec="/usr/libexec/wine" nopie_files="${_wine_libexec}/wine${_wine_suffix}"