From 71e753c34e9911d3a873e104bac6d5c2155e73ad Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Sun, 25 May 2014 10:45:02 +0100 Subject: Hack until we have time to write an autoconf check --- src/pam_radius_auth.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/pam_radius_auth.h') diff --git a/src/pam_radius_auth.h b/src/pam_radius_auth.h index 7241117..e252ce9 100644 --- a/src/pam_radius_auth.h +++ b/src/pam_radius_auth.h @@ -76,17 +76,26 @@ typedef struct radius_conf_t { * Platform specific defines *************************************************************************/ -#ifdef sun -#define PAM_EXTERN extern +#ifndef CONST +# if defined(__sun) || defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) /* * On older versions of Solaris, you may have to change this to: * #define CONST */ -#define CONST const +# define CONST const #else -#define CONST const +# define CONST #endif +#ifndef PAM_EXTERN +# ifdef __sun +# define PAM_EXTERN extern +# else +# define PAM_EXTERN +# endif +#endif + + /************************************************************************* * Useful macros and defines *************************************************************************/ -- cgit v1.2.3