Solaris doesn't know AF_LOCAL

This commit is contained in:
Pieter Noordhuis 2010-12-16 22:59:07 +01:00
parent a1e2c6dfed
commit 7e4ce57367
2 changed files with 7 additions and 1 deletions

2
net.c
View File

@ -44,7 +44,7 @@
#include <stdarg.h>
#include <stdio.h>
#include "hiredis.h"
#include "net.h"
#include "sds.h"
/* Forward declaration */

6
net.h
View File

@ -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);