mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-08 16:36:21 +00:00
21 lines
460 B
C
21 lines
460 B
C
/* Tests initialization of the resolver library.
|
|
* Adapted from none/tests/resolv for Solaris.
|
|
*/
|
|
|
|
#include <resolv.h>
|
|
#include <stdio.h>
|
|
#include <strings.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
struct __res_state stats;
|
|
bzero(&stats, sizeof(stats));
|
|
|
|
printf("PRE stats->nscount = %d\n", stats.nscount );
|
|
fflush(stdout);
|
|
res_ninit(&stats);
|
|
printf("POST stats->nscount = %d\n", ( int ) stats.nscount > 0 );
|
|
fflush(stdout);
|
|
return 0;
|
|
}
|