Fix portability issues on *BSD and MacOS
[exim.git] / src / src / string.c
index a3fbc4ea577999f9aedd1721fd5420480600a10a..461dac56beda5edfdb133b6932b6bbc32756f2d2 100644 (file)
@@ -1706,6 +1706,17 @@ return yield;
 #endif  /* COMPILE_UTILITY */
 
 
+#ifndef COMPILE_UTILITY
+/* qsort(3), currently used to sort the environment variables
+for -bP environment output, needs a function to compare two pointers to string
+pointers. Here it is. */
+
+int
+string_compare_by_pointer(const void *a, const void *b)
+{
+return Ustrcmp(* CUSS a, * CUSS b);
+}
+#endif /* COMPILE_UTILITY */