From patchwork Fri Jul 14 10:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 788324 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x88l15kLBz9s78 for ; Fri, 14 Jul 2017 20:56:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 23E4B882B9; Fri, 14 Jul 2017 10:56:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aUg0J0jygnSL; Fri, 14 Jul 2017 10:56:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6BCE08823B; Fri, 14 Jul 2017 10:56:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2C5DF1C0119 for ; Fri, 14 Jul 2017 10:56:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2830F876D4 for ; Fri, 14 Jul 2017 10:56:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LdIYf6ADNjIq for ; Fri, 14 Jul 2017 10:56:30 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0BA6588A6E for ; Fri, 14 Jul 2017 10:56:29 +0000 (UTC) Received: from x230.trabucayre.com (unknown [78.252.129.8]) by smtp3-g21.free.fr (Postfix) with ESMTP id E28C613F899; Fri, 14 Jul 2017 12:56:26 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Fri, 14 Jul 2017 12:58:54 +0200 Message-Id: <20170714105854.17053-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.13.0 Cc: Gwenhael Goavec-Merou Subject: [Buildroot] [PATCH] librtlsdr: backport pull request to fix build with newer compilers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou Fix: http://autobuild.buildroot.net/results/ece/ece557db739aaad9b53130a8ecb4d98f6f67aedf Signed-off-by: Gwenhael Goavec-Merou --- ...x-builds-with-newer-compilers-C-standards.patch | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 package/librtlsdr/0002-fix-builds-with-newer-compilers-C-standards.patch diff --git a/package/librtlsdr/0002-fix-builds-with-newer-compilers-C-standards.patch b/package/librtlsdr/0002-fix-builds-with-newer-compilers-C-standards.patch new file mode 100644 index 0000000000..b663d08b9f --- /dev/null +++ b/package/librtlsdr/0002-fix-builds-with-newer-compilers-C-standards.patch @@ -0,0 +1,68 @@ +From ea6a86d8e792430faa3a8161ee99f2bc392875d1 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 3 Feb 2017 15:44:18 -1000 +Subject: [PATCH] fix builds with newer compilers & C standards + +The meaning of "inline" has changed when "static" is not used. +Since none of these functions are used outside of their respective +files, mark them as static to avoid build errors where funcs are +not inlined (based on compiler flags too). + +Upstream status: pull request #38 + +Signed-off-by: Gwenhael Goavec-Merou +--- + src/rtl_adsb.c | 8 ++++---- + src/rtl_power.c | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c +index e611e78..a3bfa7f 100644 +--- a/src/rtl_adsb.c ++++ b/src/rtl_adsb.c +@@ -182,7 +182,7 @@ int magnitute(uint8_t *buf, int len) + return len/2; + } + +-inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d) ++static inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d) + /* takes 4 consecutive real samples, return 0 or 1, BADSAMPLE on error */ + { + int bit, bit_p; +@@ -223,17 +223,17 @@ inline uint16_t single_manchester(uint16_t a, uint16_t b, uint16_t c, uint16_t d + return BADSAMPLE; + } + +-inline uint16_t min16(uint16_t a, uint16_t b) ++static inline uint16_t min16(uint16_t a, uint16_t b) + { + return ab ? a : b; + } + +-inline int preamble(uint16_t *buf, int i) ++static inline int preamble(uint16_t *buf, int i) + /* returns 0/1 for preamble at index i */ + { + int i2; +diff --git a/src/rtl_power.c b/src/rtl_power.c +index aa7a138..a7a43bb 100644 +--- a/src/rtl_power.c ++++ b/src/rtl_power.c +@@ -249,7 +249,7 @@ void sine_table(int size) + } + } + +-inline int16_t FIX_MPY(int16_t a, int16_t b) ++static inline int16_t FIX_MPY(int16_t a, int16_t b) + /* fixed point multiply and scale */ + { + int c = ((int)a * (int)b) >> 14; +-- +2.13.0 +