I was testing this library with the upcoming OpenSMTPD aport that I am
creating. All dns queries were failing. Upon investigation I found
that NETDB_SUCCESS in libasr/src/openbsd-compat/defines.h had an
incorrect value of -1 being set (it was being defined since
NETDB_SUCCESS is not present in musl).
res_randomid() is not implemented in musl. As such, running `ldd` on
the generated .so yields:
Error relocating src/libasr-1.0.2/src/.libs/libasr.so.0.0.2:
res_randomid: symbol not found
This patch implements res_randomid using OpenBSD's implementation.
Also changed the source of the tarball to point to the tagged version
available at github since it does not assume a specific version of
autotools (the older source tarball does).
FYI, the included patch is awaiting merging upstream:
https://github.com/OpenSMTPD/libasr/pull/10