From: Florian Forster Date: Fri, 17 Apr 2009 23:02:59 +0000 (+0200) Subject: src/libcollectdclient/: Check if EILSEQ is defined. X-Git-Tag: collectd-4.7.0~7^2~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4ea822d83441f31e816d0742f1276bb501a0cb11;p=collectd.git src/libcollectdclient/: Check if EILSEQ is defined. And fall back to EPROTO or EINVAL if it is not, e. g. under FreeBSD. --- diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 684fa39b..f62994c6 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -74,6 +74,15 @@ # define NI_MAXHOST 1025 #endif +/* OpenBSD doesn't have EPROTO, FreeBSD doesn't have EILSEQ. Oh what joy! */ +#ifndef EILSEQ +# ifdef EPROTO +# define EILSEQ EPROTO +# else +# define EILSEQ EINVAL +# endif +#endif + /* Secure/static macros. They work like `strcpy' and `strcat', but assure null * termination. They work for static buffers only, because they use `sizeof'. * The `SSTRCATF' combines the functionality of `snprintf' and `strcat' which