Code

Correct compilation on FreeBSD, set HOST_NAME_MAX to _POSIX_HOST_NAME_MAX if isn...
authorbiancalana <ale@biancalanas.net>
Fri, 6 Jul 2012 01:07:15 +0000 (22:07 -0300)
committerFlorian Forster <octo@collectd.org>
Mon, 9 Jul 2012 05:42:29 +0000 (07:42 +0200)
src/redis.c

index b694e09db8f84a6be6767b20cacd50d37791b074..86062d9c5d5816063462ed6b5133d6c8856e34d5 100644 (file)
 #include <pthread.h>
 #include <credis.h>
 
+#ifndef HOST_NAME_MAX
+# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
 #define REDIS_DEF_HOST   "localhost"
 #define REDIS_DEF_PORT    6379
 #define REDIS_DEF_TIMEOUT 2000