Fix portability issues on *BSD and MacOS
[exim.git] / src / src / readconf.c
index 9f6954cf0f964ac464e68e64576acda6e56c3c02..1de6bd72e4bbe997a1e840bb62bbba4620b79d59 100644 (file)
@@ -11,9 +11,12 @@ implementation of the conditional .ifdef etc. */
 
 #include "exim.h"
 
+extern char **environ;
+
 static void fn_smtp_receive_timeout(const uschar * name, const uschar * str);
 
 
+
 #define CSTATE_STACK_SIZE 10
 
 
@@ -2674,7 +2677,7 @@ if (type == NULL)
       size_t n;
       for (p = USS environ; *p; p++) ;
       n = p - USS environ;
-      qsort(environ, p - USS environ, sizeof(*p), (__compar_fn_t) string_compare_by_pointer);
+      qsort(environ, p - USS environ, sizeof(*p), string_compare_by_pointer);
 
       for (p = USS environ; *p; p++)
         {