From patchwork Tue Jul 24 18:21:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 10542901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D8F9157A for ; Tue, 24 Jul 2018 18:21:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8974B29088 for ; Tue, 24 Jul 2018 18:21:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D0942908B; Tue, 24 Jul 2018 18:21:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09DBA29088 for ; Tue, 24 Jul 2018 18:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388409AbeGXT2w (ORCPT ); Tue, 24 Jul 2018 15:28:52 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:41488 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388520AbeGXT2w (ORCPT ); Tue, 24 Jul 2018 15:28:52 -0400 Received: by mail-qt0-f193.google.com with SMTP id e19-v6so5090250qtp.8 for ; Tue, 24 Jul 2018 11:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=FcbChZ1l1bxYy5Ukon4Dp0HdNnQRFuoBZZntUPK8rZk=; b=qLMGFvBi11aDyZ4Bif3ibjh5Ugj1g/m0yD55sUcPGWz56/APfXINNl7xg8M2ByJyzm Mq8LoIHRGL+VYlaamNI69/LzRZVKSPBPoxh1szeYVTNb7OwizWpz9J1DMHhitVY3adp7 RMq+GmFpeqFLlhx3UwQRioVwrNNR0XgDmF5WJ+hex2zl7/CdzUMYQwh80jQJhKHnp803 l0llOlVR+V21BoDj6CAxmijNZcqH6tJkHGuw2hOF5yS08sYLA7UEyiuDABlVskHKYJp+ upkmopg7tq01gCzmRd+SL2VE4sIb2M0Unajztsv2dtp+VSv2uyCb2SKVGVGdipG/t/gv J3mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=FcbChZ1l1bxYy5Ukon4Dp0HdNnQRFuoBZZntUPK8rZk=; b=XyuriBlXO50dCP1uFmKQjfC9iGHrFwZwjNnqSS9fkdSWcXc14rxzo1n6aeQfSpvxvP RXXh1vBIlzxkWZxRYLeGyoJ0ScY9JJAK6tGJnh/q7l+8ym8tfg+SQ9qtR/ATGdecbZUl EtSUokL+2CnjvtPh5ZS4tErWWjB86EP/ufqjObQjfAR0x+GIbrwOtgCKwEmE8FBFRf95 eXY9PCUEvIoZyc3U4vPcTcNyJtyKjcdqsy3aYEN+VbQ4ySnP/pzOIVK5zru5wadjLcr0 GA3vU/PBJULww2QbAyxHa25VnrZdGFtMvQUL9qZFOqSCCMgFQP18FFNp99TqIpLeTS3B prEQ== X-Gm-Message-State: AOUpUlFuY3FI/2a5SaT4yvg6UvUHgfkcwiWkLdq/d/L+W77bs5B/Kvle wiotHN3FiboAKLdCuI68AcIZ5kOmhuc= X-Google-Smtp-Source: AAOMgpfeIBcyIKImBgOcZSa4JarW6UDhQSSo6IrsRVPzvER3stmLSmQkV136PNXh5G2DuVEdCMVMMQ== X-Received: by 2002:aed:3e50:: with SMTP id m16-v6mr17799549qtf.214.1532456468627; Tue, 24 Jul 2018 11:21:08 -0700 (PDT) Received: from [192.168.1.183] (c-73-142-227-196.hsd1.ma.comcast.net. [73.142.227.196]) by smtp.googlemail.com with ESMTPSA id l190-v6sm7368651qkd.64.2018.07.24.11.21.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 11:21:08 -0700 (PDT) To: Jason Gunthorpe , Honggang LI Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH opensm] Replace deprecated 'BSD_SOURCE' macro in Makefiles with GNU_SOURCE Message-ID: <684221ea-4b2f-c9d8-efc9-a7a870e41949@dev.mellanox.co.il> Date: Tue, 24 Jul 2018 14:21:07 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP to eliminate the following warning with gcc8: _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE 'BSD_SOURCE' macro is deprecated in glibc >= 2.19 grep -r -l '\-D_BSD_SOURCE=1' | xargs -I {} sed -e 's/-D_BSD_SOURCE=1/-D_GNU_SOURCE=1/' -i {} Also, remove explicit defines of _GNU_SOURCE Signed-off-by: Honggang Li Signed-off-by: Hal Rosenstock Acked-by: Honggang Li --- complib/Makefile.am | 2 +- complib/cl_nodenamemap.c | 1 - opensm/Makefile.am | 2 +- opensm/osm_console.c | 1 - opensm/osm_console_io.c | 1 - opensm/osm_torus.c | 3 --- osmeventplugin/Makefile.am | 2 +- 7 files changed, 3 insertions(+), 9 deletions(-) diff --git a/complib/Makefile.am b/complib/Makefile.am index 70e5681..21e496a 100644 --- a/complib/Makefile.am +++ b/complib/Makefile.am @@ -9,7 +9,7 @@ else DBGFLAGS = -g endif -libosmcomp_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 +libosmcomp_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1 if HAVE_LD_VERSION_SCRIPT libosmcomp_version_script = -Wl,--version-script=$(srcdir)/libosmcomp.map diff --git a/complib/cl_nodenamemap.c b/complib/cl_nodenamemap.c index 8ac88cd..353f58c 100644 --- a/complib/cl_nodenamemap.c +++ b/complib/cl_nodenamemap.c @@ -32,7 +32,6 @@ * */ -#define _GNU_SOURCE #include #include #include diff --git a/opensm/Makefile.am b/opensm/Makefile.am index 86975d3..658cc86 100644 --- a/opensm/Makefile.am +++ b/opensm/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(OSMV_INCLUDES) $(METIS_INCLUDES) -AM_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 +AM_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1 lib_LTLIBRARIES = libopensm.la diff --git a/opensm/osm_console.c b/opensm/osm_console.c index 0b20b13..9b91a42 100644 --- a/opensm/osm_console.c +++ b/opensm/osm_console.c @@ -37,7 +37,6 @@ # include #endif /* HAVE_CONFIG_H */ -#define _GNU_SOURCE /* for getline */ #include #include #include diff --git a/opensm/osm_console_io.c b/opensm/osm_console_io.c index e358a55..f529e25 100644 --- a/opensm/osm_console_io.c +++ b/opensm/osm_console_io.c @@ -46,7 +46,6 @@ # include #endif /* HAVE_CONFIG_H */ -#define _GNU_SOURCE /* for getline */ #ifdef ENABLE_OSM_CONSOLE_LOOPBACK #include #include diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c index 5e788b3..9165c99 100644 --- a/opensm/osm_torus.c +++ b/opensm/osm_torus.c @@ -35,9 +35,6 @@ * */ -/* for getline() in stdio.h */ -#define _GNU_SOURCE - #include #include #include diff --git a/osmeventplugin/Makefile.am b/osmeventplugin/Makefile.am index 01eeb0b..d86b635 100644 --- a/osmeventplugin/Makefile.am +++ b/osmeventplugin/Makefile.am @@ -10,7 +10,7 @@ else DBGFLAGS = -g endif -libosmeventplugin_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 +libosmeventplugin_la_CFLAGS = -Wall -Wwrite-strings $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1 if HAVE_LD_VERSION_SCRIPT libosmeventplugin_version_script = -Wl,--version-script=$(srcdir)/libosmeventplugin.map