From cf03e0a4748e122fd1bf2ec9d00e539b70f3eb3f Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 25 Jul 2012 15:48:34 -0500 Subject: [PATCH] crypto: Use our strcasecmp in kernel A few pieces of heimdal we use in the kernel call strcasecmp (hcrypto/evp.c, krb5/crypto.c). The strcasecmp function does not exist in all kernels (specifically, it does not exist in at least Linux 2.4, 2.6.9, and probably not on Solaris pre-10). Since we have our own copy of strcasecmp (called afs_strcasecmp), just use that for now. Ideally we would have some kind of configure test for detecting the presence of the function in the kernel, and use the roken implementation when we don't. We currently have the framework for neither of those in place at the moment, though, so just get by with this for now. Change-Id: Ia96b17596da6cb168c80c92486fa049c05205da4 Reviewed-on: http://gerrit.openafs.org/7881 Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Derrick Brashear --- src/crypto/hcrypto/kernel/config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crypto/hcrypto/kernel/config.h b/src/crypto/hcrypto/kernel/config.h index 724ba18b5..3475c64ec 100644 --- a/src/crypto/hcrypto/kernel/config.h +++ b/src/crypto/hcrypto/kernel/config.h @@ -27,6 +27,8 @@ #include "afs/stds.h" #include "afs/sysincludes.h" +#include "afs/afsincludes.h" +#include "afs/afs_prototypes.h" /* Asserting is a mess - we need the RX headers in order to get a definition * for osi_Assert */ @@ -58,6 +60,9 @@ char * _afscrypto_strdup(const char *); #define realloc _afscrypto_realloc void * _afscrypto_realloc(void *, size_t); +/* we may not have strcasecmp in the kernel */ +#define strcasecmp afs_strcasecmp + /* osi_readRandom is also prototyped in afs_prototypes.h, but pulling that in * here creates loads of additional dependencies */ extern int osi_readRandom(void *, afs_size_t); -- 2.39.5