summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-03-22 13:20:35 +0000
committerfoobar <sniper@php.net>2001-03-22 13:20:35 +0000
commitf446cc2e3fcbd05f4ce013f083b172298dd6aa69 (patch)
tree9f9d846131d8c6ce8a22d5a9b89d4eec06e9e4bc
parent715b32f61881aaee31b8d7a8df2b4229d226ba9c (diff)
downloadphp-git-f446cc2e3fcbd05f4ce013f083b172298dd6aa69.tar.gz
MFH
-rw-r--r--ext/sockets/sockets.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index d1528b464c..15114d8608 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -1130,6 +1130,7 @@ PHP_FUNCTION(bind)
if (sock_type->sa_family == AF_UNIX) {
struct sockaddr_un *sa = (struct sockaddr_un *) sock_type;
memset(sa, 0, sizeof(sa_storage)); /* This is safe -> sock_type = &sa_storage -> sa = sock_type */
+ sa->sun_family = AF_UNIX;
snprintf(sa->sun_path, 108, "%s", Z_STRVAL_PP(arg1));
ret = bind(Z_LVAL_PP(arg0), (struct sockaddr *) sa, SUN_LEN(sa));
} else if (sock_type->sa_family == AF_INET) {