* 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>
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) {