chiark
/
gitweb
/
~mdw
/
fwd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various minor portability fixes.
[fwd]
/
un.c
diff --git
a/un.c
b/un.c
index c0a2cc910ad6ca377f6a2af4b4823570b53699f2..6b3c71f39ba2c3b2d124914c66d3ae1d6f40a88b 100644
(file)
--- a/
un.c
+++ b/
un.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: un.c,v 1.
1 1999/07/26 23:34:11
mdw Exp $
+ * $Id: un.c,v 1.
2 1999/07/27 18:30:53
mdw Exp $
*
* Protocol specific definitions for Unix-domain sockets
*
*
* Protocol specific definitions for Unix-domain sockets
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: un.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: un.c,v $
+ * Revision 1.2 1999/07/27 18:30:53 mdw
+ * Various minor portability fixes.
+ *
* Revision 1.1 1999/07/26 23:34:11 mdw
* New socket address types.
*
* Revision 1.1 1999/07/26 23:34:11 mdw
* New socket address types.
*
@@
-37,6
+40,7
@@
/*----- Header files ------------------------------------------------------*/
#include "config.h"
/*----- Header files ------------------------------------------------------*/
#include "config.h"
+#undef sun /* Cretins */
#include <ctype.h>
#include <errno.h>
#include <ctype.h>
#include <errno.h>
@@
-94,6
+98,7
@@
static addr *un_read(scanner *sc, unsigned type)
d.len + 1);
ua->a.ops = &un_ops;
ua->a.sz = offsetof(struct sockaddr_un, sun_path) + d.len + 1;
d.len + 1);
ua->a.ops = &un_ops;
ua->a.sz = offsetof(struct sockaddr_un, sun_path) + d.len + 1;
+ memset(&ua->sun, 0, ua->a.sz);
ua->sun.sun_family = AF_UNIX;
memcpy(ua->sun.sun_path, d.buf, d.len + 1);
dstr_destroy(&d);
ua->sun.sun_family = AF_UNIX;
memcpy(ua->sun.sun_path, d.buf, d.len + 1);
dstr_destroy(&d);