git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8959d15
)
logging: properly cast sockaddr_in to sockaddr for bind in start_syslog_daemon()
author
Michael Adam
<obnox@samba.org>
Fri, 25 Nov 2011 15:40:52 +0000
(16:40 +0100)
committer
Michael Adam
<obnox@samba.org>
Fri, 25 Nov 2011 23:34:53 +0000
(
00:34
+0100)
server/ctdb_logging.c
patch
|
blob
|
history
diff --git
a/server/ctdb_logging.c
b/server/ctdb_logging.c
index 2ef2a0b1fb8480e9a3bc1e27fd983bc8409f5e3e..1f7f984961a943d67586a76d2cf22e88ab47365b 100644
(file)
--- a/
server/ctdb_logging.c
+++ b/
server/ctdb_logging.c
@@
-141,7
+141,9
@@
int start_syslog_daemon(struct ctdb_context *ctdb)
syslog_sin.sin_port = htons(CTDB_PORT);
syslog_sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- if (bind(state->syslog_fd, &syslog_sin, sizeof(syslog_sin)) == -1) {
+ if (bind(state->syslog_fd, (struct sockaddr *)&syslog_sin,
+ sizeof(syslog_sin)) == -1)
+ {
if (errno == EADDRINUSE) {
/* this is ok, we already have a syslog daemon */
_exit(0);