#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
return 1;
}
+#ifdef IPV6_SUPPORTED
+sa_family_t config_default_family = AF_UNSPEC;
+#else
+sa_family_t config_default_family = AF_INET;
+#endif
+
/*
* Returns TRUE and fills in @family if a valid NFS protocol option
* is found, or FALSE if the option was specified with an invalid value.
unsigned long protocol;
char *option;
-#ifdef IPV6_SUPPORTED
- *family = AF_UNSPEC;
-#else
- *family = AF_INET;
-#endif
+ *family = config_default_family;
switch (po_rightmost(options, nfs_transport_opttbl)) {
case 0: /* udp */
unsigned long protocol;
char *option;
-#ifdef HAVE_LIBTIRPC
- *family = AF_UNSPEC;
-#else
- *family = AF_INET;
-#endif
+ *family = config_default_family;
option = po_get(options, "mountproto");
if (option != NULL)