Fix a build problem on Mac OS X (thanks to Steven Simon)
authornbk <nbk>
Tue, 10 Jan 2006 11:46:24 +0000 (11:46 +0000)
committernbk <nbk>
Tue, 10 Jan 2006 11:46:24 +0000 (11:46 +0000)
and a few compilation warnings.

src/modules/rlm_perl/rlm_perl.c

index 8b46bab..d75c0a8 100644 (file)
 #include <dlfcn.h>
 #include <semaphore.h>
 
+#ifdef __APPLE__
+extern char **environ;
+#endif
+
 static const char rcsid[] = "$Id$";
 
 #ifdef USE_ITHREADS
@@ -253,7 +257,7 @@ static void rlm_perl_close_handles(void **handles)
 static PerlInterpreter *rlm_perl_clone(PerlInterpreter *perl)
 {
        PerlInterpreter *clone;
-       UV      clone_flags = NULL;
+       UV      clone_flags = 0;
 
        PERL_SET_CONTEXT(perl);
 
@@ -641,7 +645,7 @@ static XS(XS_radiusd_radlog)
  * The xlat function
  */
 static int perl_xlat(void *instance, REQUEST *request, char *fmt, char * out,
-                    int freespace, RADIUS_ESCAPE_STRING func)
+                    size_t freespace, RADIUS_ESCAPE_STRING func)
 {
 
        PERL_INST       *inst= (PERL_INST *) instance;
@@ -1179,7 +1183,7 @@ static int perl_post_auth(void *instance, REQUEST *request)
 static int perl_detach(void *instance)
 {
        PERL_INST       *inst = (PERL_INST *) instance;
-       int             exitstatus=0,count=0, i=0;
+       int             exitstatus=0,count=0;
 
 #ifdef USE_ITHREADS
        POOL_HANDLE     *handle, *tmp, *tmp2;