projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
email plugin: "Calculate" UNIX_PATH_MAX if it is not defined.
[collectd.git]
/
src
/
email.c
diff --git
a/src/email.c
b/src/email.c
index
b5d8acf
..
404a20a
100644
(file)
--- a/
src/email.c
+++ b/
src/email.c
@@
-62,6
+62,11
@@
# include <sys/un.h>
#endif /* HAVE_LINUX_UN_H | HAVE_SYS_UN_H */
# include <sys/un.h>
#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 <grp.h>
#endif /* HAVE_GRP_H */
#if HAVE_GRP_H
# include <grp.h>
#endif /* HAVE_GRP_H */