summaryrefslogtreecommitdiffabout
path: root/gacopyz/gacopyz.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-12-12 13:19:02 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-12-12 13:19:02 (GMT)
commit57adf50a0299978606069e64b994e9bfb58ad701 (patch) (side-by-side diff)
treedaf5506f682c93a5b6d64c79aa179e57ddf67ef0 /gacopyz/gacopyz.c
parent0f78d4cebb75377eeb3c61e349e8eb088d9d88be (diff)
downloadmailfromd-57adf50a0299978606069e64b994e9bfb58ad701.tar.gz
mailfromd-57adf50a0299978606069e64b994e9bfb58ad701.tar.bz2
* src/syslog_async.c: Include config.h, netinet/in.h and signal.h
Conditionally include paths.h, provide replacements for _PATH_LOG and _PATH_CONSOLE if it is absent. Provide dummy replacement for MSG_NOSIGNAL and LOG_PERROR. (log_write_async): Ignore SIGPIPE if MSG_NOSIGNAL is not defined. * src/main.c: Conditionally compile syslog-async stuff. * src/Makefile.am: Likewise. * configure.ac: Check for paths.h. Restore previous meaning of --enable-syslog-async. (DEFAULT_SYSLOG_ASYNC): New variable. Raise version number to 4.2.1. * doc/mailfromd.texi: Reflect above-mentioned changes. * gacopyz/server.c, gacopyz/gacopyz.c: Rename all sun to s_un and sin to s_in, to avoid name clashes. * NEWS (4.2.1): New entry. git-svn-id: file:///svnroot/mailfromd/tags/release_4_2@1535 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'gacopyz/gacopyz.c') (more/less context) (ignore whitespace changes)
-rw-r--r--gacopyz/gacopyz.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c
index 1fff7ed..24f694e 100644
--- a/gacopyz/gacopyz.c
+++ b/gacopyz/gacopyz.c
@@ -152,8 +152,8 @@ do_connect(gacopyz_conn_t conn,
{
union {
struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_un sun;
+ struct sockaddr_in s_in;
+ struct sockaddr_un s_un;
} addr;
int socklen;
int fd, flags;
@@ -171,7 +171,7 @@ do_connect(gacopyz_conn_t conn,
return -1;
}
- if (strlen(path) > sizeof addr.sun.sun_path) {
+ if (strlen(path) > sizeof addr.s_un.sun_path) {
errno = EINVAL;
gacopyz_log(conn, SMI_LOG_ERR,
_("%s: %s: UNIX socket name too long"),
@@ -180,8 +180,8 @@ do_connect(gacopyz_conn_t conn,
}
addr.sa.sa_family = PF_UNIX;
- socklen = sizeof(addr.sun);
- strcpy(addr.sun.sun_path, path);
+ socklen = sizeof(addr.s_un);
+ strcpy(addr.s_un.sun_path, path);
if (stat(path, &st)) {
if (errno == ENOENT) {
@@ -217,7 +217,7 @@ do_connect(gacopyz_conn_t conn,
char *p;
addr.sa.sa_family = PF_INET;
- socklen = sizeof(addr.sin);
+ socklen = sizeof(addr.s_in);
if (!port) {
gacopyz_log(conn, SMI_LOG_ERR,
@@ -250,7 +250,7 @@ do_connect(gacopyz_conn_t conn,
}
if (!path)
- addr.sin.sin_addr.s_addr = INADDR_ANY;
+ addr.s_in.sin_addr.s_addr = INADDR_ANY;
else {
struct hostent *hp = gethostbyname(path);
if (!hp) {
@@ -262,8 +262,8 @@ do_connect(gacopyz_conn_t conn,
addr.sa.sa_family = hp->h_addrtype;
switch (hp->h_addrtype) {
case AF_INET:
- memmove(&addr.sin.sin_addr, hp->h_addr, 4);
- addr.sin.sin_port = pnum;
+ memmove(&addr.s_in.sin_addr, hp->h_addr, 4);
+ addr.s_in.sin_port = pnum;
break;
default:

Return to:

Send suggestions and report system problems to the System administrator.