From 019767b546dcbe6225feb5894caa227c0649f98c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 5 Dec 2007 11:11:55 +0100 Subject: [PATCH] [BUILD] fix build on AIX due to recent log changes --- include/types/log.h | 3 +-- src/log.c | 2 +- src/standard.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/types/log.h b/include/types/log.h index d15b1ab23d..3281c3ce54 100644 --- a/include/types/log.h +++ b/include/types/log.h @@ -22,6 +22,7 @@ #ifndef _TYPES_LOG_H #define _TYPES_LOG_H +#include #include #include #include @@ -54,8 +55,6 @@ struct logsrv { } u; }; -int logsrv_addrlen(const struct logsrv *logsrv); - #endif /* _TYPES_LOG_H */ /* diff --git a/src/log.c b/src/log.c index e4ecc3c92d..fdb3b8c456 100644 --- a/src/log.c +++ b/src/log.c @@ -147,7 +147,7 @@ int get_log_facility(const char *fac) /* * 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 647a6c8f6b..dc09467eaa 100644 --- a/src/standard.c +++ b/src/standard.c @@ -99,7 +99,7 @@ struct sockaddr_un *str2sun(char *str) } #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); -- 2.47.3