From 4ea822d83441f31e816d0742f1276bb501a0cb11 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 18 Apr 2009 01:02:59 +0200 Subject: [PATCH] src/libcollectdclient/: Check if EILSEQ is defined. And fall back to EPROTO or EINVAL if it is not, e. g. under FreeBSD. --- src/libcollectdclient/client.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.11.0