diff options
-rw-r--r-- | src/lib9/dial.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib9/dial.c b/src/lib9/dial.c index 5b4ece07..c3634766 100644 --- a/src/lib9/dial.c +++ b/src/lib9/dial.c @@ -17,6 +17,7 @@ #include <netdb.h> #undef unix +#define unix xunix int p9dial(char *addr, char *local, char *dummy2, int *dummy3) @@ -122,9 +123,12 @@ Unix: } strcpy(su.sun_path, unix); free(buf); - if((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) + if((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0){ + werrstr("socket: %r"); return -1; + } if(connect(s, (struct sockaddr*)&su, sizeof su) < 0){ + werrstr("connect %s: %r", su.sun_path); close(s); return -1; } |