diff --git a/src/decode_aprs.c b/src/decode_aprs.c index d00d8ffe..561d834a 100644 --- a/src/decode_aprs.c +++ b/src/decode_aprs.c @@ -3935,10 +3935,11 @@ static void decode_tocall (decode_aprs_t *A, char *dest) * models before getting to the more generic APY. */ -#if defined(__WIN32__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__) - qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), tocall_cmp); -#else +#if defined(__linux__) + /* glibc defines __compar_fn_t, which is not defined by POSIX. */ qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), (__compar_fn_t)tocall_cmp); +#else + qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), tocall_cmp); #endif } else {