From 7e4ce5736750e438dc4a94e2651b434faf0c98b5 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 16 Dec 2010 22:59:07 +0100 Subject: [PATCH] Solaris doesn't know AF_LOCAL --- net.c | 2 +- net.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/net.c b/net.c index 73883fb..8817146 100644 --- a/net.c +++ b/net.c @@ -44,7 +44,7 @@ #include #include -#include "hiredis.h" +#include "net.h" #include "sds.h" /* Forward declaration */ diff --git a/net.h b/net.h index 0e56000..b052d97 100644 --- a/net.h +++ b/net.h @@ -31,6 +31,12 @@ #ifndef __NET_H #define __NET_H +#include "hiredis.h" + +#if defined(__sun) +#define AF_LOCAL AF_UNIX +#endif + int redisContextConnectTcp(redisContext *c, const char *addr, int port); int redisContextConnectUnix(redisContext *c, const char *path);