You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h" /* HAVE_SOCKADDR_STORAGE ? */
+#endif
+
+#ifndef WIN32
#include <sys/socket.h> /* struct sockaddr_storage */
+#endif
#include "libnfs-zdr.h"
+
+#if !defined(HAVE_SOCKADDR_STORAGE) && !defined(WIN32)
+/*
+ * RFC 2553: protocol-independent placeholder for socket addresses
+ */
+#define _SS_MAXSIZE 128
+#define _SS_ALIGNSIZE (sizeof(double))
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
+ _SS_PAD1SIZE - _SS_ALIGNSIZE)
+
+struct sockaddr_storage {
+#ifdef HAVE_SOCKADDR_LEN
+ unsigned char ss_len; /* address length */
+ unsigned char ss_family; /* address family */
+#else
+ unsigned short ss_family;
+#endif
+ char __ss_pad1[_SS_PAD1SIZE];
+ double __ss_align; /* force desired structure storage alignment */
+ char __ss_pad2[_SS_PAD2SIZE];
+};
+#endif
+
+
struct rpc_fragment {
struct rpc_fragment *next;
uint64_t size;
void *connect_data;
struct AUTH *auth;
- unsigned long xid;
+ uint32_t xid;
/* buffer used for encoding RPC PDU */
char *encodebuf;
struct rpc_pdu {
struct rpc_pdu *next;
- unsigned long xid;
+ uint32_t xid;
ZDR zdr;
uint32_t written;