]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/export/rmtab.c
mountd: Replace "struct hostent" with "struct addrinfo"
[nfs-utils.git] / support / export / rmtab.c
index 0ec495c43c80e972d5cededb4946ab74c1718889..31c0f50419193e7426c7ccf7bb7eb67045a213a8 100644 (file)
@@ -28,17 +28,14 @@ static void
 rmtab_read_wildcard(struct rmtabent *rep)
 {
        nfs_export *exp, *exp2;
-       struct hostent *hp;
+       struct addrinfo *ai;
 
-       hp = gethostbyname(rep->r_client);
-       if (hp == NULL)
-               return;
-       hp = hostent_dup(hp);
-       if (hp == NULL)
+       ai = host_addrinfo(rep->r_client);
+       if (ai == NULL)
                return;
 
-       exp = export_allowed(hp, rep->r_path);
-       free(hp);
+       exp = export_allowed(ai, rep->r_path);
+       freeaddrinfo(ai);
        if (exp == NULL)
                return;