#ifndef _TYPES_LOG_H
#define _TYPES_LOG_H
+#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <common/config.h>
} u;
};
-int logsrv_addrlen(const struct logsrv *logsrv);
-
#endif /* _TYPES_LOG_H */
/*
/*
* 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) {
}
#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);