aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-23 04:38:20 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-23 04:38:20 +0000
commit7ab7969c70f8b97fa8dd2e4a8f0220dbcef241db (patch)
treef7d832bdd082e4f1acda28b4110fedbe6bc6ba5a /misc
parent7735afa212034346f31baa6aee5466de74309541 (diff)
downloadglibc-7ab7969c70f8b97fa8dd2e4a8f0220dbcef241db.tar
glibc-7ab7969c70f8b97fa8dd2e4a8f0220dbcef241db.tar.gz
glibc-7ab7969c70f8b97fa8dd2e4a8f0220dbcef241db.tar.bz2
glibc-7ab7969c70f8b97fa8dd2e4a8f0220dbcef241db.zip
[BZ #1499]
* misc/syslog.c (SyslogAddr): Use sockaddr_un instead of sockaddr. (openlog_internal): Adjust for this change.
Diffstat (limited to 'misc')
-rw-r--r--misc/syslog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/syslog.c b/misc/syslog.c
index cae13f876b..6b0e7748fe 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -35,6 +35,7 @@ static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94";
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/uio.h>
+#include <sys/un.h>
#include <netdb.h>
#include <errno.h>
@@ -326,7 +327,7 @@ vsyslog(pri, fmt, ap)
}
libc_hidden_def (vsyslog)
-static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
+static struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
static void
@@ -342,9 +343,9 @@ openlog_internal(const char *ident, int logstat, int logfac)
int retry = 0;
while (retry < 2) {
if (LogFile == -1) {
- SyslogAddr.sa_family = AF_UNIX;
- (void)strncpy(SyslogAddr.sa_data, _PATH_LOG,
- sizeof(SyslogAddr.sa_data));
+ SyslogAddr.sun_family = AF_UNIX;
+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
+ sizeof(SyslogAddr.sun_path));
if (LogStat & LOG_NDELAY) {
if ((LogFile = __socket(AF_UNIX, LogType, 0))
== -1)