Description: fix rpc_getrpcbport() when libtirpc is disabled
 When the rpc_getrpcbport() function was introduced the port number
 returned is in network byte order. But, when libtirpc is disabled
 the function was returning the port in host byte order instead
 causing connection failures.

Author: Ian Kent <raven@themaw.net>

Origin: upstream, https://kernel.googlesource.com/pub/scm/linux/storage/autofs/autofs/+/fb2c67038d40f4d5e73e57efc4f659f28da9d1ff%5E%21/#F1
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1386869
Last-Update: 2014-02-25

--- autofs-5.0.8.orig/lib/rpc_subs.c
+++ autofs-5.0.8/lib/rpc_subs.c
@@ -380,7 +380,7 @@ static unsigned short rpc_getrpcbport(co
 done:
 	pthread_mutex_unlock(&rpcb_mutex);
 #endif
-	return (unsigned short) PMAPPORT;
+	return (unsigned short) htons(PMAPPORT);
 }
 
 /*
