X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Femail.c;h=404a20a8951f6619b9a481f7051f9d4f10859918;hb=33d409e0d68beac9d6d5439a9237b50f28fcd976;hp=b5d8acfdf15bb19b1c80b3970a4c765bfb13ca4f;hpb=717eec35268cb3fe9fb5cefe11246255dbc3811e;p=collectd.git 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 */