readsb: update to 3.9.0 14820/head
authorRosen Penev <rosenp@gmail.com>
Sun, 21 Feb 2021 03:57:48 +0000 (19:57 -0800)
committerRosen Penev <rosenp@gmail.com>
Sun, 21 Feb 2021 04:07:51 +0000 (20:07 -0800)
Remove upstreamed patches.

Use autorelease to avoid bumping the release manually.

Fix bad linker variable on glibc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/readsb/Makefile
utils/readsb/patches/001-network-avoid-segfault-in-freeaddrinfo.patch [deleted file]
utils/readsb/patches/010-gcc10.patch [deleted file]

index dc46e98cf2bf536b70840ed823f962d00546671a..e9ed05bde214107cb0d5578d3f3fda679496b436 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=readsb
-PKG_VERSION:=3.8.3
-PKG_RELEASE:=2
+PKG_VERSION:=3.9.0
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/Mictronics/readsb/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=bf59b8ecd0ff66945b210c55a5b824aa63ff8cbb1704249528d30a4902e716b2
+PKG_HASH:=234e2f5f45d69d8be376272e9a08be54bdc48ed5ad7ebad2c4374bbd754d9426
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING LICENSE
@@ -50,7 +50,7 @@ MAKE_FLAGS += \
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 TARGET_LDFLAGS += \
-       $(if $(CONFIG_LIBC_USE_GLIBC),,-largp) \
+       $(if $(CONFIG_USE_GLIBC),,-largp) \
        -Wl,--gc-sections,--as-needed
 
 define Package/readsb/conffiles
diff --git a/utils/readsb/patches/001-network-avoid-segfault-in-freeaddrinfo.patch b/utils/readsb/patches/001-network-avoid-segfault-in-freeaddrinfo.patch
deleted file mode 100644 (file)
index a389475..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-From 82014a5fa9930b0875e57869265acf011772277c Mon Sep 17 00:00:00 2001
-From: Stijn Tintel <stijn@linux-ipv6.be>
-Date: Sun, 3 May 2020 20:56:58 +0300
-Subject: [PATCH] network: avoid segfault in freeaddrinfo
-
-Calling freeaddrinfo(NULL) when using musl libc causes a segfault.
-
-Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
----
- anet.c     | 15 ++++++++++++---
- net_io.c   |  5 ++++-
- viewadsb.c |  5 ++++-
- 3 files changed, 20 insertions(+), 5 deletions(-)
-
---- a/anet.c
-+++ b/anet.c
-@@ -212,7 +212,10 @@ static int anetTcpGenericConnect(char *e
-             if (ss) {
-                 memcpy(ss, p->ai_addr, sizeof(*ss));
-             }
--            freeaddrinfo(gai_result);
-+            if (gai_result) {
-+                freeaddrinfo(gai_result);
-+                gai_result = NULL;
-+            }
-             return s;
-         }
-@@ -220,7 +223,10 @@ static int anetTcpGenericConnect(char *e
-         anetCloseSocket(s);
-     }
--    freeaddrinfo(gai_result);
-+    if (gai_result) {
-+        freeaddrinfo(gai_result);
-+        gai_result = NULL;
-+    }
-     return ANET_ERR;
- }
-@@ -368,7 +374,10 @@ int anetTcpServer(char *err, char *servi
-         fds[i++] = s;
-     }
--    freeaddrinfo(gai_result);
-+    if (gai_result) {
-+        freeaddrinfo(gai_result);
-+        gai_result = NULL;
-+    }
-     return (i > 0 ? i : ANET_ERR);
- }
---- a/net_io.c
-+++ b/net_io.c
-@@ -3285,7 +3285,10 @@ void cleanupNetwork(void) {
-     for (int i = 0; i < Modes.net_connectors_count; i++) {
-         struct net_connector *con = Modes.net_connectors[i];
-         free(con->address);
--        freeaddrinfo(con->addr_info);
-+        if (con->addr_info) {
-+            freeaddrinfo(con->addr_info);
-+            con->addr_info = NULL;
-+        }
-         if (con->mutex) {
-             pthread_mutex_unlock(con->mutex);
-             pthread_mutex_destroy(con->mutex);
---- a/viewadsb.c
-+++ b/viewadsb.c
-@@ -308,7 +308,10 @@ int main(int argc, char **argv) {
-     }
-     // Free local service and client
-     if (s) free(s);
--    freeaddrinfo(con->addr_info);
-+    if (con->addr_info) {
-+        freeaddrinfo(con->addr_info);
-+        con->addr_info = NULL;
-+    }
-     pthread_mutex_unlock(con->mutex);
-     pthread_mutex_destroy(con->mutex);
-     free(con->mutex);
diff --git a/utils/readsb/patches/010-gcc10.patch b/utils/readsb/patches/010-gcc10.patch
deleted file mode 100644 (file)
index ffa7a37..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5119c21ae56f1c7fd0b10250d1beca9634bf74af Mon Sep 17 00:00:00 2001
-From: Mictronics <github@mictronics.de>
-Date: Sun, 14 Jun 2020 18:06:22 +0200
-Subject: [PATCH] Clean up linkage of struct Modes.
-
----
- readsb.c         | 2 ++
- readsb.h         | 6 ++++--
- viewadsb.c       | 2 ++
- 3 files changed, 8 insertions(+), 2 deletions(-)
-
---- a/readsb.c
-+++ b/readsb.c
-@@ -57,6 +57,8 @@
- #include <stdarg.h>
-+struct _Modes Modes;
-+
- //
- // ============================= Program options help ==========================
- //
---- a/readsb.h
-+++ b/readsb.h
-@@ -312,7 +312,7 @@ struct mag_buf
- // Program global state
--struct
-+struct _Modes
- { // Internal state
-   pthread_cond_t data_cond; // Conditional variable associated
-   pthread_t reader_thread;
-@@ -412,7 +412,9 @@ struct
-   struct stats stats_15min;
-   struct timespec reader_cpu_accumulator; // CPU time used by the reader thread, copied out and reset by the main thread under the mutex
-   struct mag_buf mag_buffers[MODES_MAG_BUFFERS]; // Converted magnitude buffers from RTL or file input
--} Modes;
-+};
-+
-+extern struct _Modes Modes;
- // The struct we use to store information about a decoded message.
---- a/viewadsb.c
-+++ b/viewadsb.c
-@@ -54,6 +54,8 @@
- #include "readsb.h"
- #include "help.h"
-+struct _Modes Modes;
-+
- #define _stringize(x) x
- #define verstring(x) _stringize(x)