X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpinba.c;h=e94ad8f61b667b0728085bff1c5a7129f9dcd802;hb=9b7dee8838f56233cea2854a7ddbcad2790609ce;hp=6879733501cbedaa32cbfaa4afde3ca527771894;hpb=51a4e62d7d0e73d8d5822efaef1e3218b5ad0373;p=collectd.git diff --git a/src/pinba.c b/src/pinba.c index 68797335..e94ad8f6 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -20,7 +20,7 @@ * Authors: * Antony Dovgal * Phoenix Kayo - * Florian Forster + * Florian Forster **/ #include "collectd.h" @@ -35,6 +35,11 @@ #include "pinba.pb-c.h" +/* AIX doesn't have MSG_DONTWAIT */ +#ifndef MSG_DONTWAIT +# define MSG_DONTWAIT MSG_NONBLOCK +#endif + /* * Defines */ @@ -331,6 +336,7 @@ static int pb_add_socket (pinba_socket_t *s, /* {{{ */ char errbuf[1024]; ERROR ("pinba plugin: bind(2) failed: %s", sstrerror (errno, errbuf, sizeof (errbuf))); + close (fd); return (0); }