I'm working on merging Timo's patch for ns_parse: http://git.alpinelinux.org/cgit/aports/tree/main/musl/1001-add-basic-dns-record-parsing-functions.patch?id=81d50064c335467fdfd80368bac6707d70db1af7 The first issue that came up in the process is that arpa/nameser.h, which was previously not used by musl itself and really should never have been accepted in its current form, is full of junk like statement-expressions. Including it in a file that will be compiled with musl adds build dependency on these nonstandard features. I cleaned that up with no problem (just un-inlining the macros since we're adding function versions anyway), but there are a few more issues. The main issue is that the parser functions have pointer arithmetic overflows (UB) checking against the end-of-message pointer. I've tried to fix that and I'm attaching a patch for review, along with my version of the fixed file. I'd appreciate comments on whether I missed anything. Other changes were mostly cosmetic or at least mechanical. Rich