Commit 1680eaf3 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

AF_UNIX seems to be more widely accepted than AF_LOCAL

parent e54def88
...@@ -58,7 +58,7 @@ redis_address redis_address_un(const char *path) { ...@@ -58,7 +58,7 @@ redis_address redis_address_un(const char *path) {
struct sockaddr_un sa; struct sockaddr_un sa;
memset(&sa, 0, sizeof(sa)); memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_LOCAL; sa.sun_family = AF_UNIX;
strncpy((char*)&sa.sun_path, path, sizeof(sa.sun_path)); strncpy((char*)&sa.sun_path, path, sizeof(sa.sun_path));
sa.sun_path[sizeof(sa.sun_path) - 1] = '\0'; sa.sun_path[sizeof(sa.sun_path) - 1] = '\0';
return redis_address_from_un(sa); return redis_address_from_un(sa);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment