From patchwork Tue Sep 20 14:00:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bedarkar X-Patchwork-Id: 672283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sdktw6mV9z9s8x for ; Wed, 21 Sep 2016 00:01:12 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BF54D87C0A; Tue, 20 Sep 2016 14:01:09 +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 IhnaFPAAaaLS; Tue, 20 Sep 2016 14:01:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4E8DC86812; Tue, 20 Sep 2016 14:01:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C37191CF862 for ; Tue, 20 Sep 2016 14:01:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BB79886099 for ; Tue, 20 Sep 2016 14:01:07 +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 T5nMhRmIFYw3 for ; Tue, 20 Sep 2016 14:01:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by fraxinus.osuosl.org (Postfix) with ESMTP id 18BC785B83 for ; Tue, 20 Sep 2016 14:01:07 +0000 (UTC) Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id D2960475C1BB0 for ; Tue, 20 Sep 2016 15:00:51 +0100 (IST) Received: from PUMAIL01.pu.imgtec.org (192.168.91.250) by HHMAIL01.hh.imgtec.org (10.100.10.19) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 20 Sep 2016 15:00:54 +0100 Received: from pudesk287-linux.pu.imgtec.org (192.168.91.23) by PUMAIL01.pu.imgtec.org (192.168.91.250) with Microsoft SMTP Server (TLS) id 14.3.266.1; Tue, 20 Sep 2016 19:30:52 +0530 From: Rahul Bedarkar To: Date: Tue, 20 Sep 2016 19:30:14 +0530 Message-ID: <1474380014-20249-1-git-send-email-rahul.bedarkar@imgtec.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [192.168.91.23] Cc: Rahul Bedarkar Subject: [Buildroot] [PATCH] ushare: fix build with NLS support 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add patch to fix build errors when NLS support is enabled. Fixes: http://autobuild.buildroot.net/results/19d/19d67dd43e5a313c77e4be97ecb9811ffa52f797/ Signed-off-by: Rahul Bedarkar --- ...e-config-h-before-checking-for-CONFIG-NLS.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch diff --git a/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch b/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch new file mode 100644 index 0000000..e97c3de --- /dev/null +++ b/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch @@ -0,0 +1,42 @@ +ushare.c: include config.h before checking for CONFIG_NLS + +When NLS support is enabled, we get following build errors: + + ushare.c: In function 'setup_i18n': + ushare.c:745:3: warning: implicit declaration of function 'setlocale' [-Wimplicit-function-declaration] + setlocale (LC_ALL, ""); + ^ + ushare.c:745:14: error: 'LC_ALL' undeclared (first use in this function) + setlocale (LC_ALL, ""); + ^ + ushare.c:745:14: note: each undeclared identifier is reported only once for each function it appears in + make[2]: *** [ushare.o] Error 1 + +When NLS support is enabled, configure script creates macro in config.h. +We check for CONFIG_NLS before including config.h which results in above +build errors as locale.h doesn't get included. + +This patch fixes above build error by including config.h before we check for +CONFIG_NLS. + +This build error is detected by Buildroot autobuilder +http://autobuild.buildroot.net/results/19d/19d67dd43e5a313c77e4be97ecb9811ffa52f797/ + +Signed-off-by: Rahul Bedarkar + +--- ushare-1.1a/src/ushare.c.old 2016-09-20 19:04:00.915239326 +0530 ++++ ushare-1.1a/src/ushare.c 2016-09-20 19:04:24.707239276 +0530 +@@ -56,11 +56,12 @@ + #include + #include + ++#include "config.h" ++ + #if (defined(HAVE_SETLOCALE) && defined(CONFIG_NLS)) + # include + #endif + +-#include "config.h" + #include "ushare.h" + #include "services.h" + #include "http.h"