ref: 073546effee37340cd682778536bb84a77110cad
parent: f0f00c4644ec29bc528c2b47e9ec4e284f72cccc
author: Ori Bernstein <[email protected]>
date: Tue Oct 29 07:59:40 EDT 2013
Fix the connection to the DNS server.
--- a/libstd/resolve.myr
+++ b/libstd/resolve.myr
@@ -60,11 +60,12 @@
-> -1
;;
/* hardcode Google DNS for now */
+ sa.fam = Afinet
sa.port = hosttonet(53)
sa.addr = 0x08080808
status = connect(s, (&sa) castto(sockaddr#), sizeof(sockaddr_in))
if status < 0
- put("Warning: Failed to connect to server: %l\n", s)
+ put("Warning: Failed to connect to server: %l\n", status)
-> -1
;;
-> s