netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varsha Rao <rvarsha016@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: Varsha Rao <rvarsha016@gmail.com>
Subject: [PATCH iptables] extensions: Add macro _DEFAULT_SOURCE.
Date: Thu, 21 Dec 2017 09:05:45 +0530	[thread overview]
Message-ID: <20171221033545.2676-2-rvarsha016@gmail.com> (raw)
In-Reply-To: <20171221033545.2676-1-rvarsha016@gmail.com>

Define _DEFAULT_SOURCE as _BSD_SOURCE is deprecated.
https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes

This patch fixes the following warning:

warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
 # _DEFAULT_SOURCE"

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 extensions/libxt_hashlimit.c | 1 +
 extensions/libxt_limit.c     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
index e51ac1ae..ffe342a7 100644
--- a/extensions/libxt_hashlimit.c
+++ b/extensions/libxt_hashlimit.c
@@ -11,6 +11,7 @@
  * Error corections by nmalykh@bilim.com (22.01.2005)
  */
 #define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
 #define _ISOC99_SOURCE 1
 #include <inttypes.h>
 #include <math.h>
diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c
index 5cc95c2e..c8ddca87 100644
--- a/extensions/libxt_limit.c
+++ b/extensions/libxt_limit.c
@@ -4,6 +4,7 @@
  * Hervé Eychenne    <rv@wallfire.org>
  */
 #define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
 #define _ISOC99_SOURCE 1
 #include <math.h>
 #include <stdio.h>
-- 
2.14.3


  reply	other threads:[~2017-12-21  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21  3:35 [PATCH iptables] iptables: Remove const qualifier from struct option Varsha Rao
2017-12-21  3:35 ` Varsha Rao [this message]
2017-12-21  8:10   ` [PATCH iptables] extensions: Add macro _DEFAULT_SOURCE Pablo Neira Ayuso
2017-12-21  8:09 ` [PATCH iptables] iptables: Remove const qualifier from struct option Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171221033545.2676-2-rvarsha016@gmail.com \
    --to=rvarsha016@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).