From: Simon Wilkinson Date: Tue, 1 Mar 2011 14:35:35 +0000 (+0000) Subject: kernel crypto: Tidy up includes X-Git-Tag: upstream/1.8.0_pre1^2~4121 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d2688a0cf10ddd6767d68179707cb2e21168b118;p=packages%2Fo%2Fopenafs.git kernel crypto: Tidy up includes Don't include the whole of afsincludes.h when building our kernel crypto interface, as it can lead to symbol collisions on Fedora 10 and later. Instead, just include rx/rx.h, which is sadly required to get an osi_Assert prototype, and explicitly prototype our osi_readRandom() function Change-Id: I55d03d76ac0cc8f490aa30f6986115cefae8f427 Reviewed-on: http://gerrit.openafs.org/4101 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/crypto/hcrypto/kernel/config.h b/src/crypto/hcrypto/kernel/config.h index 8aa71ce8d..29e9947ab 100644 --- a/src/crypto/hcrypto/kernel/config.h +++ b/src/crypto/hcrypto/kernel/config.h @@ -27,9 +27,17 @@ #include "afs/stds.h" #include "afs/sysincludes.h" -#include "afsincludes.h" +/* Asserting is a mess - we need the RX headers in order to get a definition + * for osi_Assert */ #define assert osi_Assert +#include + +/* hcrypto uses "static inline", which isn't supported by some of our + * compilers */ +#if !defined(inline) && !defined(__GNUC__) +#define inline +#endif /* We need wrappers for the various memory management functions */ #define calloc _afscrypto_calloc @@ -46,3 +54,7 @@ char * _afscrypto_strdup(const char *); #define realloc _afscrypto_realloc void * _afscrypto_realloc(void *, size_t); + +/* 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);