1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 04:11:35 +01:00

Added fix for IP::tot_len's endianess in OSX.

This commit is contained in:
Matias Fontanini
2012-12-03 20:34:15 -03:00
parent 742276c251
commit 53fe80d8a7
2 changed files with 4 additions and 4 deletions

View File

@@ -170,8 +170,8 @@ void IP::tos(uint8_t new_tos) {
}
void IP::tot_len(uint16_t new_tot_len) {
// BSD wants this in host byte order............
#ifdef BSD
// FreeBSD wants this in host byte order............
#ifdef __FreeBSD__
_ip.tot_len = new_tot_len;
#else
_ip.tot_len = Endian::host_to_be(new_tot_len);