X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Femail.c;h=9fd05ba0fcf15ad4aa9a6de2d8a8cd0319aa1d20;hb=c8143a8ae616b003001a57c68f3a9b193c390dc8;hp=55e0ed5e6c0bd14646f1fd66a018b84db471870f;hpb=09dd1124225a599e7d9513f6d44cb1045dca9c59;p=collectd.git diff --git a/src/email.c b/src/email.c index 55e0ed5e..9fd05ba0 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 */