]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/showmount/showmount.c
Use 65534 for anon uid/gid rather than -2
[nfs-utils.git] / utils / showmount / showmount.c
index 47b58255a285a2af1338c59f2d6f8ea5bd54f3b5..8fb58a2c2e1c13c6936a8cdfea9b64b785d56ece 100644 (file)
@@ -13,7 +13,9 @@
  * GNU General Public License for more details.
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdio.h>
 #include <rpc/rpc.h>
@@ -154,9 +156,8 @@ char **argv;
                break;
        }
 
-       if (hostname[0] >= '0' && hostname[0] <= '9') {
+       if (inet_aton(hostname, &server_addr.sin_addr)) {
                server_addr.sin_family = AF_INET;
-               server_addr.sin_addr.s_addr = inet_addr(hostname);
        }
        else {
                if ((hp = gethostbyname(hostname)) == NULL) {