From b9fdae7c266efd13da5155bc35f495192bf2a06b Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 24 May 1995 11:16:28 +0000 Subject: [PATCH] Include or declare malloc, calloc, or realloc git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5856 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin.old/client/ChangeLog | 5 +++++ src/kadmin.old/client/kadmin.c | 8 +++++++- src/kadmin.old/client/kadmin_adr.c | 6 ++++++ src/kadmin.old/client/kadmin_cpr.c | 6 ++++++ src/kadmin.old/client/kadmin_del.c | 6 ++++++ src/kadmin.old/client/kadmin_inq.c | 6 ++++++ src/kadmin.old/client/kadmin_mod.c | 6 ++++++ src/kadmin.old/client/kadmin_msnd.c | 6 ++++++ 8 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/kadmin.old/client/ChangeLog b/src/kadmin.old/client/ChangeLog index b06e100cb..918167b15 100644 --- a/src/kadmin.old/client/ChangeLog +++ b/src/kadmin.old/client/ChangeLog @@ -1,3 +1,8 @@ +Wed May 24 07:03:21 1995 Ezra Peisach + + * kadmin_del.c, kadmin_mod.c, kadmin_inq.c, kadmin_cpr.c, + kadmin_adr.c, kadmin_msnd.c, kadmin.c: Include stdlib.h or + declare malloc(), calloc() and realloc(). Mon May 22 09:55:54 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Install old kadmin as kadmin_old. Manpage too. diff --git a/src/kadmin.old/client/kadmin.c b/src/kadmin.old/client/kadmin.c index 9f9113802..b927af326 100644 --- a/src/kadmin.old/client/kadmin.c +++ b/src/kadmin.old/client/kadmin.c @@ -39,6 +39,12 @@ #include "krb5.h" #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + static krb5_error_code get_first_ticket PROTOTYPE((krb5_context, krb5_ccache, @@ -588,7 +594,7 @@ adm5_init_link(context, realm_of_server, port, local_socket) return retval; } /* connect to the server */ - if (connect(*local_socket, &remote_sin, sizeof(remote_sin)) < 0) { + if (connect(*local_socket, (struct sockaddr *) &remote_sin, sizeof(remote_sin)) < 0) { retval = errno; fprintf(stderr, "Cannot Connect to Socket!\n"); close(*local_socket); diff --git a/src/kadmin.old/client/kadmin_adr.c b/src/kadmin.old/client/kadmin_adr.c index 49c871086..fea68b98f 100644 --- a/src/kadmin.old/client/kadmin_adr.c +++ b/src/kadmin.old/client/kadmin_adr.c @@ -33,6 +33,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + void decode_kadmind_reply(); int print_status_message(); diff --git a/src/kadmin.old/client/kadmin_cpr.c b/src/kadmin.old/client/kadmin_cpr.c index 0752ca236..95b1cc374 100644 --- a/src/kadmin.old/client/kadmin_cpr.c +++ b/src/kadmin.old/client/kadmin_cpr.c @@ -34,6 +34,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + void decode_kadmind_reply(); int print_status_message(); diff --git a/src/kadmin.old/client/kadmin_del.c b/src/kadmin.old/client/kadmin_del.c index 1753f007c..062bff0b7 100644 --- a/src/kadmin.old/client/kadmin_del.c +++ b/src/kadmin.old/client/kadmin_del.c @@ -31,6 +31,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + void decode_kadmind_reply(); int print_status_message(); diff --git a/src/kadmin.old/client/kadmin_inq.c b/src/kadmin.old/client/kadmin_inq.c index 374455b7c..89ce970ae 100644 --- a/src/kadmin.old/client/kadmin_inq.c +++ b/src/kadmin.old/client/kadmin_inq.c @@ -32,6 +32,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + void decode_kadmind_reply(); int print_status_message(); diff --git a/src/kadmin.old/client/kadmin_mod.c b/src/kadmin.old/client/kadmin_mod.c index e7d565413..71a1df8ed 100644 --- a/src/kadmin.old/client/kadmin_mod.c +++ b/src/kadmin.old/client/kadmin_mod.c @@ -32,6 +32,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + void decode_kadmind_reply(); int print_status_message(); diff --git a/src/kadmin.old/client/kadmin_msnd.c b/src/kadmin.old/client/kadmin_msnd.c index 7887e435e..8cfe63906 100644 --- a/src/kadmin.old/client/kadmin_msnd.c +++ b/src/kadmin.old/client/kadmin_msnd.c @@ -38,6 +38,12 @@ #include #include "adm_defs.h" +#ifdef HAVE_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif -- 2.26.2