[dvblast-devel] Fix compilation under OSX.
Georgi Chorbadzhiyski
git at videolan.org
Sun Oct 27 20:50:06 CET 2013
dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Sun Oct 27 21:34:33 2013 +0200| [65b717b1095adc17f2ffed6abbfce1e7d639fa8f] | committer: Georgi Chorbadzhiyski
Fix compilation under OSX.
OS X (and FreeBSD) have their own "strict ip" definition. It is
binary compatible with Linux "struct iphdr".
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=65b717b1095adc17f2ffed6abbfce1e7d639fa8f
---
dvblast.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/dvblast.h b/dvblast.h
index 6543df1..8a08bd2 100644
--- a/dvblast.h
+++ b/dvblast.h
@@ -49,6 +49,22 @@ struct udpheader { // FAVOR_BSD hell ...
u_int16_t check;
};
+#if defined(__FreeBSD__) || defined(__APPLE__)
+struct iphdr {
+ unsigned int ihl:4;
+ unsigned int version:4;
+ uint8_t tos;
+ uint16_t tot_len;
+ uint16_t id;
+ uint16_t frag_off;
+ uint8_t ttl;
+ uint8_t protocol;
+ uint16_t check;
+ uint32_t saddr;
+ uint32_t daddr;
+};
+#endif
+
struct udprawpkt {
struct iphdr iph;
struct udpheader udph;
More information about the dvblast-devel
mailing list