Browse Source

[master] fixed linker issue on SunStudio

Apparently SunStudio's name mangler cannot handle the use of the typedef in the anonymous namespace in asiolink.cc. For now I have removed the offending use of it (the other instances where it was used were ok), we probably want to move it to a header and use it consistently. Much thanks to jinmei for pointing out the problem :)
Jelte Jansen 14 years ago
parent
commit
6d9d7b76a3
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/lib/asiolink/asiolink.cc

+ 6 - 2
src/lib/asiolink/asiolink.cc

@@ -282,9 +282,13 @@ typedef std::vector<std::pair<std::string, uint16_t> > AddressVector;
 
 }
 
+// Here we do not use the typedef above, as the SunStudio compiler
+// mishandles this in its name mangling, and wouldn't compile.
+// We can probably use a typedef, but need to move it to a central
+// location and use it consistently.
 RecursiveQuery::RecursiveQuery(DNSService& dns_service,
-    const AddressVector& upstream,
-    const AddressVector& upstream_root,
+    const std::vector<std::pair<std::string, uint16_t> >& upstream,
+    const std::vector<std::pair<std::string, uint16_t> >& upstream_root,
     int query_timeout, int client_timeout, int lookup_timeout,
     unsigned retries) :
     dns_service_(dns_service), upstream_(new AddressVector(upstream)),