Hi,

I am having essentially the same problem as here:
http://openbsd.7691.n7.nabble.com/res-init-and-0-0-0-0-td234246.html

Specifically it is GNUMail and Pantomime which do not resolve correctly.

I reduced myself to almost the same test program:
main()
{
  int i;

  if (res_init() == -1)
    return;

  if ((_res.options & RES_INIT) == 0)
    return;

  printf("Successfully inited, we have %d servers\n", _res.nscount);

  for (i = 0; i < _res.nscount; i++)
    {
printf("%d-th server is in int: %d\n", i, _res.nsaddr_list[i].sin_addr.s_addr);
    }
}


I get this output:
Successfully inited, we have 1 servers
0-th server is in int: 0

Thus... I get something empty back.

As the thread suggests, I installed libbind and linked against it.
gcc restest.o -lbind -Wl,-L/usr/local/lib/libbind -Wl,-R/usr/local/lib/libbind


ldd confirms linking was successful:
        Start    End      Type Open Ref GrpRef Name
        1c000000 3c004000 exe  1    0   0      a.out
0b4c8000 2b4d0000 rlib 0 1 0 /usr/local/lib/libbind/libbind.so.3.0
        06881000 268b1000 rlib 0    1   0      /usr/lib/libc.so.69.0
        051b6000 051b6000 rtld 0    1   0      /usr/libexec/ld.so

However, I still get an empty server back.


Further suggestions?

Riccardo

Reply via email to