Created
June 14, 2010 00:02
-
-
Save danielfone/437115 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ars.c b/ars.c | |
index 7c9ed45..97ad68f 100644 | |
--- a/ars.c | |
+++ b/ars.c | |
@@ -830,7 +830,7 @@ int ars_bsd_fix(struct ars_packet *pkt, unsigned char *packet, size_t size) | |
return -ARS_INVALID; | |
} | |
ip = (struct ars_iphdr*) packet; | |
-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI | |
+#if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI | |
ip->tot_len = ntohs(ip->tot_len); | |
ip->frag_off = ntohs(ip->frag_off); | |
#endif | |
diff --git a/bytesex.h b/bytesex.h | |
index 8abea18..668392b 100644 | |
--- a/bytesex.h | |
+++ b/bytesex.h | |
@@ -8,6 +8,7 @@ | |
#define ARS_BYTESEX_H | |
#if defined(__i386__) \ | |
+ || defined(__x86_64__) \ | |
|| defined(__alpha__) \ | |
|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) | |
#define BYTE_ORDER_LITTLE_ENDIAN | |
diff --git a/libpcap_stuff.c b/libpcap_stuff.c | |
index 80a63d5..a356139 100644 | |
--- a/libpcap_stuff.c | |
+++ b/libpcap_stuff.c | |
@@ -16,8 +16,8 @@ | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sys/ioctl.h> | |
-#include <pcap.h> | |
#include <net/bpf.h> | |
+#include <pcap.h> | |
#include "globals.h" | |
diff --git a/sendip.c b/sendip.c | |
index 4d5a310..ae5cb85 100644 | |
--- a/sendip.c | |
+++ b/sendip.c | |
@@ -48,7 +48,7 @@ void send_ip (char* src, char *dst, char *data, unsigned int datalen, | |
ip->ihl = (IPHDR_SIZE + optlen + 3) >> 2; | |
ip->tos = ip_tos; | |
-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI | |
+#if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI | |
/* FreeBSD */ | |
/* NetBSD */ | |
ip->tot_len = packetsize; | |
@@ -73,7 +73,7 @@ void send_ip (char* src, char *dst, char *data, unsigned int datalen, | |
htons((unsigned short) src_id); | |
} | |
-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI | |
+#if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI | |
/* FreeBSD */ | |
/* NetBSD */ | |
ip->frag_off |= more_fragments; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment