[BUILD] fix build on AIX due to recent log changes
diff --git a/include/types/log.h b/include/types/log.h
index d15b1ab..3281c3c 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -22,6 +22,7 @@
 #ifndef _TYPES_LOG_H
 #define _TYPES_LOG_H
 
+#include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <common/config.h>
@@ -54,8 +55,6 @@
 	} u;
 };
 
-int logsrv_addrlen(const struct logsrv *logsrv);
-
 #endif /* _TYPES_LOG_H */
 
 /*
diff --git a/src/log.c b/src/log.c
index e4ecc3c..fdb3b8c 100644
--- a/src/log.c
+++ b/src/log.c
@@ -147,7 +147,7 @@
 /*
  * Return the length of the address endpoint, suitable for use with sendto().
  */
-int logsrv_addrlen(const struct logsrv *logsrv)
+static inline int logsrv_addrlen(const struct logsrv *logsrv)
 {
 #ifdef __SOCKADDR_COMMON
 	switch (logsrv->u.addr.sa_family) {
diff --git a/src/standard.c b/src/standard.c
index 647a6c8..dc09467 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -99,7 +99,7 @@
 	}
 
 #ifndef __SOCKADDR_COMMON
-	sun.sun_len = sizeof(sun);
+	sun.sun_len = sizeof(sun.sun_path);
 #endif  /* !__SOCKADDR_COMMON */
 	sun.sun_family = AF_UNIX;
 	memcpy(sun.sun_path, str, strsz);