+2001-07-30 Ezra Peisach <epeisach@mit.edu>
+
+ * sendauth.c (krb5_sendauth): Instead of casting second argument
+ to getpeername() and getsockname() to "struct sockaddr *", cast to
+ system specific type as determined by autoconf.
+
2001-07-24 Ezra Peisach <epeisach@mit.edu>
* in_tkt_sky.c (krb5_get_in_tkt_with_skey): Change cast from
#include <stdio.h>
#include <string.h>
+#ifndef GETPEERNAME_ARG2_TYPE
+#define GETPEERNAME_ARG2_TYPE struct sockaddr
+#endif
+#ifndef GETPEERNAME_ARG3_TYPE
+#define GETPEERNAME_ARG3_TYPE size_t
+#endif
+#ifndef GETSOCKNAME_ARG2_TYPE
+#define GETSOCKNAME_ARG2_TYPE struct sockaddr
+#endif
+#ifndef GETSOCKNAME_ARG3_TYPE
+#define GETSOCKNAME_ARG3_TYPE size_t
+#endif
+
static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
not to guarantee randomness, but to make it less likely
that multiple sessions could pick the same subkey. */
char rnd_data[1024];
- size_t len2;
+ GETPEERNAME_ARG3_TYPE len2;
krb5_data d;
d.length = sizeof (rnd_data);
d.data = rnd_data;
len2 = sizeof (rnd_data);
- if (getpeername (*(int*)fd, (struct sockaddr *) rnd_data,
+ if (getpeername (*(int*)fd, (GETPEERNAME_ARG2_TYPE *) rnd_data,
&len2) == 0) {
d.length = len2;
(void) krb5_c_random_seed (context, &d);
}
len2 = sizeof (rnd_data);
- if (getsockname (*(int*)fd, (struct sockaddr *) rnd_data,
+ if (getsockname (*(int*)fd, (GETSOCKNAME_ARG2_TYPE *) rnd_data,
&len2) == 0) {
d.length = len2;
(void) krb5_c_random_seed (context, &d);