[Pdns-users] powerdns compling on AXP Alpha FreeBSD 5.1 fails

Scott K scottk at microbsd.net
Mon Jul 28 18:01:11 UTC 2003


lines 136 - 172

static void writePid(void)
{
  string fname=arg()["socket-dir"]+"/"+s_programname+".pid";
  ofstream of(fname.c_str());
  if(of)
    of<<getpid()<<endl;
  else
    L<<Logger::Error<<"Requested to write pid for "<<getpid()<<" to
"<<fname<<"
failed: "<<strerror(errno)<<endl;
}

void init(void)
{
  // prime root cache
  static char*ips[]={"198.41.0.4", "128.9.0.107", "192.33.4.12",
"128.8.10.90", "192.203.230.10", "192.5.5.241", "192.112.36.4", "1
28.63.2.53",
                     "192.36.148.17","192.58.128.30", "193.0.14.129",
"198.32.64.12", "202.12.27.33"};
  DNSResourceRecord arr, nsrr;
  arr.qtype=QType::A;
  arr.ttl=time(0)+3600000;
  nsrr.qtype=QType::NS;
  nsrr.ttl=time(0)+3600000;

  set<DNSResourceRecord>nsset;
  for(char c='a';c<='m';++c) {
    static char templ[40];
    strncpy(templ,"a.root-servers.net", sizeof(templ) - 1);
    *templ=c;
    arr.qname=nsrr.content=templ;
    arr.content=ips[c-'a'];
    set<DNSResourceRecord>aset;
    aset.insert(arr);
    replaceCache(string(templ),QType(QType::A),aset);

    nsset.insert(nsrr);
  }
  replaceCache("",QType(QType::NS),nsset);
}




On Mon, 2003-07-28 at 17:53, bert hubert wrote:
> On Mon, Jul 28, 2003 at 04:23:04PM +0000, Scott K wrote:
> > trying to build powerdns w/ recusion enabled on FreeBSD 5.1 Alpha fails
> 
> Can you show lines 140 to 150 of your pdns_recursor.cc? this looks really
> weird.
> 
> Thanks.



More information about the Pdns-users mailing list