From patchwork Sun Apr 17 02:11:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 611422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qnZbd4wxjz9t3f for ; Sun, 17 Apr 2016 12:14:37 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1arcCo-0008F6-0W; Sun, 17 Apr 2016 02:12:58 +0000 Received: from smtp.gentoo.org ([140.211.166.183]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1arcC8-0008DG-FR for linux-mtd@lists.infradead.org; Sun, 17 Apr 2016 02:12:17 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 48A98340AF3 for ; Sun, 17 Apr 2016 02:11:54 +0000 (UTC) From: Mike Frysinger To: linux-mtd@lists.infradead.org Subject: [PATCH mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE Date: Sat, 16 Apr 2016 22:11:51 -0400 Message-Id: <1460859111-9977-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160416_191216_544633_1761C4D6 X-CRM114-Status: UNSURE ( 7.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.9 (-------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-7.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [140.211.166.183 listed in list.dnswl.org] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The _BSD_SOURCE define has been deprecated for a while now. Instead, code should be defining _DEFAULT_SOURCE. By defining both, it'll work with both new & old versions warning-free. Signed-off-by: Mike Frysinger --- misc-utils/recv_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc-utils/recv_image.c b/misc-utils/recv_image.c index 0093831..8bd7356 100644 --- a/misc-utils/recv_image.c +++ b/misc-utils/recv_image.c @@ -2,6 +2,7 @@ #define PROGRAM_NAME "recv_image" #define _XOPEN_SOURCE 500 #define _BSD_SOURCE /* struct ip_mreq */ +#define _DEFAULT_SOURCE #include #include