iputils-20100418-so_mark.patch 601 B

1234567891011121314151617181920212223
  1. https://bugs.gentoo.org/335347
  2. fix building with older linux headers that don't define SO_MARK
  3. --- ping_common.c.org
  4. +++ ping_common.c
  5. @@ -485,6 +485,7 @@
  6. fprintf(stderr, "Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP\n");
  7. }
  8. #endif
  9. +#ifdef SO_MARK
  10. if (options & F_MARK) {
  11. if (setsockopt(icmp_sock, SOL_SOCKET, SO_MARK,
  12. &mark, sizeof(mark)) == -1) {
  13. @@ -494,6 +495,7 @@
  14. fprintf(stderr, "Warning: Failed to set mark %d\n", mark);
  15. }
  16. }
  17. +#endif
  18. /* Set some SNDTIMEO to prevent blocking forever
  19. * on sends, when device is too slow or stalls. Just put limit