From patchwork Fri Jun 5 00:09:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Ceeha X-Patchwork-Id: 480961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 34358140218 for ; Fri, 5 Jun 2015 10:09:58 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EEDA428C0CA; Fri, 5 Jun 2015 02:08:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D79B828C0B8 for ; Fri, 5 Jun 2015 02:08:07 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from rhenium.shiz.me (rhenium.shiz.me [178.21.112.109]) by arrakis.dune.hu (Postfix) with ESMTP for ; Fri, 5 Jun 2015 02:08:07 +0200 (CEST) Received: from localhost (unknown [IPv6:::1]) by rhenium.shiz.me (Postfix) with ESMTP id 99F6050217D for ; Fri, 5 Jun 2015 00:09:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at shiz.me Received: from rhenium.shiz.me ([IPv6:::1]) by localhost (rhenium.shiz.me [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id p-6ybt9G8kEM for ; Fri, 5 Jun 2015 02:09:42 +0200 (CEST) Received: from localhost (5354228C.cm-6-5a.dynamic.ziggo.nl [83.84.34.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rhenium.shiz.me (Postfix) with ESMTPSA id 65A14502030 for ; Fri, 5 Jun 2015 02:09:42 +0200 (CEST) From: Shiz To: openwrt-devel@lists.openwrt.org Date: Fri, 5 Jun 2015 02:09:27 +0200 Message-Id: <1433462967-20290-1-git-send-email-hi@shiz.me> X-Mailer: git-send-email 2.4.1 Subject: [OpenWrt-Devel] [PATCH] [packages] mtd: add missing include X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" trx.c in mtd would not include endian.h, so on systems that do not have this header implicitly included from the other headers (like musl), both __BYTE_ORDER and __BIG_ENDIAN would be undefined and thus 0, leading to it always presuming a big-endian system. this would lead to issues when running mtd fixtrx on little-endian systems, as it would never recognize the TRX magic as result of the broken STORE32_LE() macro. Signed-off-by: Shiz Tested-by: Shiz --- package/system/mtd/src/trx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c index 089d1ac..245ee76 100644 --- a/package/system/mtd/src/trx.c +++ b/package/system/mtd/src/trx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include