The random_socket function isn't used, and the code can only be
compiled if the function is optimised away (because it's static
and unused) otherwise it will fail to link when "ipv4_addr" and
"ipv6_addr" are not found.
Fix this by modifying ipv4_addr and ipv6_addr so that they're not
external variables.