Code

patches: Added recvtos -- patch for #618729 (missing IP_RECVTOS on FreeBSD).
[pkg-liboping.git] / debian / patches / recvtos
diff --git a/debian/patches/recvtos b/debian/patches/recvtos
new file mode 100644 (file)
index 0000000..ccd54a0
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/src/liboping.c
++++ b/src/liboping.c
+@@ -1540,10 +1540,12 @@
+               {
+                       int opt;
++#ifdef IP_RECVTOS
+                       /* Enable receiving the TOS field */
+                       opt = 1;
+                       setsockopt (ph->fd, IPPROTO_IP, IP_RECVTOS,
+                                       &opt, sizeof (opt));
++#endif        /* IP_RECVTOS */
+                       /* Enable receiving the TTL field */
+                       opt = 1;