summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorAlex Balashov <abalashov@evaristesys.com>2015-04-30 15:01:31 -0400
committerAlex Balashov <abalashov@evaristesys.com>2015-04-30 15:01:31 -0400
commitd132d676e918355bb33e5ac8b346f678a7dce0e9 (patch)
tree76cb4c5383809ac240599cfc738a50ad8b0a100e /net.c
parentb9f907fb4c1ce5280f26f61d611b9fcedcf6add4 (diff)
Renamed redisContext struct member 'unix' to 'unix_sock' to avoid encountering defined constant 'unix' in GNU C environment (see commit d8145d79ce715054980938c751067ebaa541573c).
Not all code using hiredis can compile using '-std=c99', and/or not all users are able to easily make that change to the build process of various open-source projects, so it is more pragmatic to choose a different identifier that does not impose this requirement.
Diffstat (limited to 'net.c')
-rw-r--r--net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.c b/net.c
index fa0dabe..60a2dc7 100644
--- a/net.c
+++ b/net.c
@@ -422,8 +422,8 @@ int redisContextConnectUnix(redisContext *c, const char *path, const struct time
return REDIS_ERR;
c->connection_type = REDIS_CONN_UNIX;
- if (c->unix.path != path)
- c->unix.path = strdup(path);
+ if (c->unix_sock.path != path)
+ c->unix_sock.path = strdup(path);
if (timeout) {
if (c->timeout != timeout) {