23 lines
601 B
Diff
23 lines
601 B
Diff
https://bugs.gentoo.org/335347
|
|
|
|
fix building with older linux headers that don't define SO_MARK
|
|
|
|
--- ping_common.c.org
|
|
+++ ping_common.c
|
|
@@ -485,6 +485,7 @@
|
|
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) {
|
|
@@ -494,6 +495,7 @@
|
|
fprintf(stderr, "Warning: Failed to set mark %d\n", mark);
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
/* Set some SNDTIMEO to prevent blocking forever
|
|
* on sends, when device is too slow or stalls. Just put limit
|