From: Willy Tarreau Date: Wed, 5 Dec 2007 10:11:55 +0000 (+0100) Subject: [BUILD] fix build on AIX due to recent log changes X-Git-Tag: v1.3.14~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=019767b546dcbe6225feb5894caa227c0649f98c;p=thirdparty%2Fhaproxy.git [BUILD] fix build on AIX due to recent log changes --- 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);