X-Git-Url: https://git.piment-noir.org/?p=deb_libnfs.git;a=blobdiff_plain;f=include%2Flibnfs-private.h;h=f153e35d9f063ac974bc2f56001e956880e79144;hp=d3cd3ec0b647c862460848c38fa57d4f56494e11;hb=d7c6e9aaa9df593e951e2f19106dcc71102e74f1;hpb=5ba63317aca8054280b18453790d23a448bdf92c diff --git a/include/libnfs-private.h b/include/libnfs-private.h index d3cd3ec..f153e35 100644 --- a/include/libnfs-private.h +++ b/include/libnfs-private.h @@ -14,10 +14,38 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" /* HAVE_SOCKADDR_STORAGE ? */ +#endif + #include /* struct sockaddr_storage */ #include "libnfs-zdr.h" +#ifndef HAVE_SOCKADDR_STORAGE +/* + * 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_SA_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;