|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/tsa/cyrus-sasl/gcc40.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
diff -dur cyrus-sasl-1.5.28/sample/client.c src.cyrus-sasl.1134298515.31795.185555095/cyrus-sasl-1.5.28/sample/client.c
|
|
--- cyrus-sasl-1.5.28/sample/client.c 2001-12-21 03:31:17.000000000 +0100
|
|
+++ src.cyrus-sasl.1134298515.31795.185555095/cyrus-sasl-1.5.28/sample/client.c 2005-12-12 03:38:20.000000000 +0100
|
|
@@ -230,7 +230,7 @@
|
|
exit(EX_OSERR);
|
|
}
|
|
|
|
- if (connect(sock, (struct sockaddr *) &sin, sizeof (sin)) < 0) {
|
|
+ if (connect(sock, (__CONST_SOCKADDR_ARG) ((const struct sockaddr_in *)&sin), sizeof (sin)) < 0) {
|
|
perror("connect");
|
|
exit(EX_UNAVAILABLE);
|
|
}
|
|
@@ -386,11 +386,11 @@
|
|
|
|
/* set ip addresses */
|
|
salen = sizeof(localaddr);
|
|
- if (getsockname(fd, (struct sockaddr *)&localaddr, &salen) < 0) {
|
|
+ if (getsockname(fd, (__SOCKADDR_ARG)&localaddr, &salen) < 0) {
|
|
perror("getsockname");
|
|
}
|
|
salen = sizeof(remoteaddr);
|
|
- if (getpeername(fd, (struct sockaddr *)&remoteaddr, &salen) < 0) {
|
|
+ if (getpeername(fd, (__SOCKADDR_ARG)&remoteaddr, &salen) < 0) {
|
|
perror("getpeername");
|
|
}
|
|
|
|
diff -dur cyrus-sasl-1.5.28/sample/server.c src.cyrus-sasl.1134298515.31795.185555095/cyrus-sasl-1.5.28/sample/server.c
|
|
--- cyrus-sasl-1.5.28/sample/server.c 2001-12-21 03:31:18.000000000 +0100
|
|
+++ src.cyrus-sasl.1134298515.31795.185555095/cyrus-sasl-1.5.28/sample/server.c 2005-12-12 03:46:32.000000000 +0100
|
|
@@ -95,7 +95,7 @@
|
|
exit(EX_OSERR);
|
|
}
|
|
|
|
- if (bind(sock, &sin, salen) < 0) {
|
|
+ if (bind(sock, (__CONST_SOCKADDR_ARG) ((const struct sockaddr_in *)&sin), salen) < 0) {
|
|
perror("bind");
|
|
exit(EX_OSERR);
|
|
}
|
|
@@ -263,7 +263,8 @@
|
|
int fd = -1;
|
|
FILE *in, *out;
|
|
|
|
- fd = accept(l, NULL, NULL);
|
|
+ __SOCKADDR_ARG nullarg;
|
|
+ fd = accept(l, nullarg, NULL);
|
|
if (fd < 0) {
|
|
perror("accept");
|
|
exit(0);
|
|
@@ -283,11 +284,11 @@
|
|
|
|
/* set ip addresses */
|
|
salen = sizeof(localaddr);
|
|
- if (getsockname(fd, (struct sockaddr *)&localaddr, &salen) < 0) {
|
|
+ if (getsockname(fd, (__SOCKADDR_ARG)&localaddr, &salen) < 0) {
|
|
perror("getsockname");
|
|
}
|
|
salen = sizeof(remoteaddr);
|
|
- if (getpeername(fd, (struct sockaddr *)&remoteaddr, &salen) < 0) {
|
|
+ if (getpeername(fd, (__SOCKADDR_ARG)&remoteaddr, &salen) < 0) {
|
|
perror("getpeername");
|
|
}
|
|
|