From patchwork Mon Dec 2 10:10:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Dawson X-Patchwork-Id: 295856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 893862C009E for ; Mon, 2 Dec 2013 21:10:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 795C68651A; Mon, 2 Dec 2013 10:10:34 +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 6rcmlRLJeV8p; Mon, 2 Dec 2013 10:10:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E57DC85C26; Mon, 2 Dec 2013 10:10:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CCFF11C2B15 for ; Mon, 2 Dec 2013 10:10:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5F20185B1B for ; Mon, 2 Dec 2013 10:10:31 +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 aR1YUNcD5EkI for ; Mon, 2 Dec 2013 10:10:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7CD51857EA for ; Mon, 2 Dec 2013 10:10:30 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hq4so4472363wib.3 for ; Mon, 02 Dec 2013 02:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=+Jt4Bs6aEz4M6KpShYb3PpYiN+htL6ZJEdQnIGMeIbk=; b=kn7yekdu27My0dNFa4bvwd9lawKxn25F9z4MqP0mlWEfonvdzoImJ7GAoCKlIQ0FCb XNCEDuUm3ZuAwgSAfMkMMaLksOVr+8jOxJ/IcG+Rysyn/hePkjVSASHxkASUuUbElljN 5aUF3WFzRCwcZcGrAFgJo77LSFuI4koN2QElnMFrQ0JvyCj8GgtTra9XpdlikHvuQ7JQ 7aDpb93kRix7IpAGADwiozuZJm82IwHQ1Dg6vaaugiGl/rEXcdundS3082gImtUhNSaV HUJe+sZ9gsF4tRr2uwn6LDlhibEjWfrU9uBABMJ7qEdXdlcjIBc/dtysnwGV7w/FuTUi r6kA== X-Received: by 10.194.143.100 with SMTP id sd4mr1123088wjb.69.1385979028795; Mon, 02 Dec 2013 02:10:28 -0800 (PST) Received: from localhost.localdomain (host109-150-80-255.range109-150.btcentralplus.com. [109.150.80.255]) by mx.google.com with ESMTPSA id bk7sm38608106wib.10.2013.12.02.02.10.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 02:10:27 -0800 (PST) From: spdawson@gmail.com To: buildroot@busybox.net Date: Mon, 2 Dec 2013 10:10:25 +0000 Message-Id: <1385979025-7231-1-git-send-email-spdawson@gmail.com> X-Mailer: git-send-email 1.8.3.2 Subject: [Buildroot] [PATCH] gpsd: fix build error when reconfigure disabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net From: Simon Dawson Fixes build failures such as the following. http://autobuild.buildroot.net/results/424/42409545547daddd77c9e9bd59474ed033834ad5/ Note that the gpsd patch has been sent, but not yet accepted, upstream. Signed-off-by: Simon Dawson --- ...04-fix-reconfigure-disabled-compile-error.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch diff --git a/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch b/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch new file mode 100644 index 0000000..90b4dc2 --- /dev/null +++ b/package/gpsd/gpsd-04-fix-reconfigure-disabled-compile-error.patch @@ -0,0 +1,33 @@ +When building with reconfigure=no, the build fails as follows. + + libgpsd_core.c: In function 'gpsd_poll': + libgpsd_core.c:1236:35: error: 'const struct gps_type_t' has no member named 'mode_switcher' + scons: *** [libgpsd_core.os] Error 1 + scons: building terminated because of errors. + make: *** [/scratch/peko/build/gpsd-3.10/.stamp_built] Error 2 + +For an example, see the following autobuild failure. + + http://autobuild.buildroot.net/results/424/42409545547daddd77c9e9bd59474ed033834ad5/ + +The problem appears to be a failure to protect the mode_switcher field with +a RECONFIGURE_ENABLE ifdef. + +Signed-off-by: Simon Dawson + +diff -Nurp a/libgpsd_core.c b/libgpsd_core.c +--- a/libgpsd_core.c 2013-11-21 08:57:44.000000000 +0000 ++++ b/libgpsd_core.c 2013-12-02 09:57:57.250335098 +0000 +@@ -1232,8 +1232,12 @@ gps_mask_t gpsd_poll(struct gps_device_t + * previous mode switch to binary succeeded in suppressing + * NMEA). + */ ++#ifdef RECONFIGURE_ENABLE + bool dependent_nmea = (newtype == NMEA_PACKET + && session->device_type->mode_switcher!=NULL); ++#else ++ bool dependent_nmea = false; ++#endif /* RECONFIGURE_ENABLE */ + + /* + * Compute whether to switch drivers.