]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] fix build on AIX due to recent log changes
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Dec 2007 10:11:55 +0000 (11:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Dec 2007 10:11:55 +0000 (11:11 +0100)
include/types/log.h
src/log.c
src/standard.c

index d15b1ab23d079657962328fcbbfdfed76754ce82..3281c3ce54ead6fabce4c6c52cc16d2a3de12ead 100644 (file)
@@ -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 @@ struct logsrv {
        } u;
 };
 
-int logsrv_addrlen(const struct logsrv *logsrv);
-
 #endif /* _TYPES_LOG_H */
 
 /*
index e4ecc3c92dcfeab15271dbc7f56dd9c8625aabcd..fdb3b8c456d87f608ac47dce29b0f61c41d15487 100644 (file)
--- 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) {
index 647a6c8f6b563a644dd85c0ef8af7c7287ba1d51..dc09467eaab3565ffef59e89c4f43c649d88769c 100644 (file)
@@ -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);