From 33d409e0d68beac9d6d5439a9237b50f28fcd976 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 4 Dec 2006 23:26:18 +0100 Subject: [PATCH] email plugin: "Calculate" UNIX_PATH_MAX if it is not defined. Some systems (e.g. Darwin) do not seem to define UNIX_PATH_MAX at all. Thus I calculate it from the size of the sun_path character array of struct sockaddr_un in this case. Signed-off-by: Sebastian Harl --- src/email.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/email.c b/src/email.c index b5d8acfd..404a20a8 100644 --- a/src/email.c +++ b/src/email.c @@ -62,6 +62,11 @@ # include #endif /* HAVE_LINUX_UN_H | HAVE_SYS_UN_H */ +/* some systems (e.g. Darwin) seem to not define UNIX_PATH_MAX at all */ +#ifndef UNIX_PATH_MAX +# define UNIX_PATH_MAX sizeof (((struct sockaddr_un *)0)->sun_path) +#endif /* UNIX_PATH_MAX */ + #if HAVE_GRP_H # include #endif /* HAVE_GRP_H */ -- 2.11.0