AC_SUBST(RPCGENFLAGS)
+# check for SA_LEN
+dnl Check if sockaddr data structure includes a "sa_len"
+AC_CHECK_MEMBER([struct sockaddr.sa_len],
+ [ AC_DEFINE(HAVE_SOCKADDR_LEN,1,[Whether sockaddr struct has sa_len]) ],
+ [],
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
#output
AC_CONFIG_FILES([Makefile]
[include/Makefile]
switch (s.ss_family) {
case AF_INET:
socksize = sizeof(struct sockaddr_in);
-#ifdef HAVE_SOCK_SIN_LEN
+#ifdef HAVE_SOCKADDR_LEN
sin->sin_len = socksize;
#endif
rpc->fd = socket(AF_INET, SOCK_STREAM, 0);