diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-08-05 11:14:30 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-08-05 11:14:30 +0000 |
commit | c59716ff4c2b17c8f8137eac14bc498d640c5f63 (patch) | |
tree | 0a010f1100cc6d16dbaf3cedc47789cdb06bd1f8 | |
parent | 6859d761d36f57668da44c4cb9281b45c463e65d (diff) | |
download | busybox-w32-c59716ff4c2b17c8f8137eac14bc498d640c5f63.tar.gz busybox-w32-c59716ff4c2b17c8f8137eac14bc498d640c5f63.tar.bz2 busybox-w32-c59716ff4c2b17c8f8137eac14bc498d640c5f63.zip |
Joel Coltoff <joel@wmi.com> noticed that following a recent
change in uClibc that changed opening the /dev/log socket as
SOCK_STREAM to SOCK_DGRAM, busybox syslogd no longer worked
since it needed a matching change. This fixes it so it
works once again.
-rw-r--r-- | sysklogd/syslogd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 3c18c507f..fc5922562 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -509,11 +509,11 @@ static void doSyslogd (void) | |||
509 | memset (&sunx, 0, sizeof (sunx)); | 509 | memset (&sunx, 0, sizeof (sunx)); |
510 | sunx.sun_family = AF_UNIX; | 510 | sunx.sun_family = AF_UNIX; |
511 | strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path)); | 511 | strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path)); |
512 | if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) | 512 | if ((sock_fd = socket (AF_UNIX, SOCK_DGRAM, 0)) < 0) |
513 | perror_msg_and_die ("Couldn't get file descriptor for socket " _PATH_LOG); | 513 | perror_msg_and_die ("Couldn't get file descriptor for socket " _PATH_LOG); |
514 | 514 | ||
515 | addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path); | 515 | addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path); |
516 | if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5))) | 516 | if (bind (sock_fd, (struct sockaddr *) &sunx, addrLength) < 0) |
517 | perror_msg_and_die ("Could not connect to socket " _PATH_LOG); | 517 | perror_msg_and_die ("Could not connect to socket " _PATH_LOG); |
518 | 518 | ||
519 | if (chmod (lfile, 0666) < 0) | 519 | if (chmod (lfile, 0666) < 0) |