--- samba/source/libsmb/clikrb5.c.orig	Thu Dec 18 15:12:44 2003
+++ samba/source/libsmb/clikrb5.c	Fri Dec 19 08:31:21 2003
@@ -53,7 +53,12 @@
 }
 #endif
 
-#if defined(HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES) && !defined(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES)
+#if defined(__APPLE__) && !defined(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES)
+krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc)
+{
+    return krb5_set_default_tgs_enctypes(ctx, enc);
+}
+#elif defined(HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES) && !defined(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES)
  krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc)
 {
 	return krb5_set_default_in_tkt_etypes(ctx, enc);
@@ -185,6 +190,7 @@ krb5_error_code get_kerberos_allowed_ety
 #if !defined(HAVE_KRB5_LOCATE_KDC)
  krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters)
 {
+#ifndef __APPLE__
 	krb5_krbhst_handle hnd;
 	krb5_krbhst_info *hinfo;
 	krb5_error_code rc;
@@ -230,6 +236,10 @@ krb5_error_code get_kerberos_allowed_ety
 
 	*naddrs = num_kdcs;
 	*addr_pp = sa;
+#else
+	DEBUG(0, ("krb5_locate_kdc: this function is not implemented on this platform\n"));
+	return -1;
+#endif
 	return 0;
 }
 #endif
