From: Mike Frysinger <vapier@gentoo.org>
To: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH 4/6] ping: fix building on older systems
Date: Wed, 1 Aug 2012 11:45:26 -0400 [thread overview]
Message-ID: <1343835928-21541-4-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1343835928-21541-1-git-send-email-vapier@gentoo.org>
The SO_MARK define is somewhat recent (linux-2.6.25), so check for its
existence before we try to use it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
ping_common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ping_common.c b/ping_common.c
index 287d0e6..6fd252d 100644
--- a/ping_common.c
+++ b/ping_common.c
@@ -486,6 +486,7 @@ void setup(int icmp_sock)
fprintf(stderr, "Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP\n");
}
#endif
+#ifdef SO_MARK
if (options & F_MARK) {
if (setsockopt(icmp_sock, SOL_SOCKET, SO_MARK,
&mark, sizeof(mark)) == -1) {
@@ -499,6 +500,7 @@ void setup(int icmp_sock)
#endif
}
}
+#endif
/* Set some SNDTIMEO to prevent blocking forever
* on sends, when device is too slow or stalls. Just put limit
--
1.7.9.7
next prev parent reply other threads:[~2012-08-01 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 15:45 [PATCH 1/6] tracepath: re-use printf return in print_host Mike Frysinger
2012-08-01 15:45 ` [PATCH 2/6] fix up strict-aliasing warnings Mike Frysinger
2012-08-01 15:45 ` [PATCH 3/6] tracepath: fix typo in -l error message Mike Frysinger
2012-08-01 15:45 ` Mike Frysinger [this message]
2012-08-01 15:45 ` [PATCH 5/6] start gitignore files Mike Frysinger
2012-08-01 15:45 ` [PATCH 6/6] doc: fix parallel build of html/man pages Mike Frysinger
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=1343835928-21541-4-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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