45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
upstreamed in wb2osz/direwolf#394
|
|
|
|
From 81f2f53675b3a965baa4dad13ee913eec26ce9d1 Mon Sep 17 00:00:00 2001
|
|
From: classabbyamp <dev@placeviolette.net>
|
|
Date: Mon, 16 May 2022 02:23:26 -0400
|
|
Subject: [PATCH] fix compilation on musl
|
|
|
|
this should allow for compilation on musl libc
|
|
|
|
possibly fixes #150
|
|
---
|
|
src/decode_aprs.c | 4 ----
|
|
src/direwolf.h | 2 +-
|
|
2 files changed, 1 insertion(+), 5 deletions(-)
|
|
|
|
diff --git a/src/direwolf.h b/src/direwolf.h
|
|
index efc329b..ca12266 100644
|
|
--- a/src/direwolf.h
|
|
+++ b/src/direwolf.h
|
|
@@ -282,7 +282,7 @@ char *strtok_r(char *str, const char *delim, char **saveptr);
|
|
char *strcasestr(const char *S, const char *FIND);
|
|
|
|
|
|
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__)
|
|
+#if ! defined(__GLIBC__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__APPLE__)
|
|
|
|
// strlcpy and strlcat should be in string.h and the C library.
|
|
|
|
--
|
|
2.36.1
|
|
--- a/src/decode_aprs.c
|
|
+++ b/src/decode_aprs.c
|
|
@@ -3930,11 +3930,7 @@
|
|
* 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
|
|
- qsort (tocalls, num_tocalls, sizeof(struct tocalls_s), (__compar_fn_t)tocall_cmp);
|
|
-#endif
|
|
}
|
|
else {
|
|
if ( ! A->g_quiet) {
|