libs: s3 and s4: make our dns lookup code signal-safe.