Merge remote branch 't-nelson/automake'
[deb_libnfs.git] / lib / socket.c
index a26afe1e6b194e46bea861e1974705b9d56a5bd1..dcbd1c177fd9be1d998399630ad8787be8deb441 100644 (file)
@@ -15,6 +15,9 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -25,6 +28,9 @@
 #include <rpc/rpc.h>
 #include <rpc/xdr.h>
 #include <arpa/inet.h>
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -422,3 +428,8 @@ int rpc_set_udp_destination(struct rpc_context *rpc, char *addr, int port, int i
 
        return 0;
 }
+
+struct sockaddr *rpc_get_recv_sockaddr(struct rpc_context *rpc)
+{
+       return (struct sockaddr *)&rpc->udp_src;
+}