gamelinux/cxtracker — Issue #6: Compiling on FreeBSD
Author: PingTrip
Created: 2011-11-05 18:12:36+00:00
State: open

Greetings, I'd like to submit a couple patches to enable compiling of cxtracker on FreeBSD. The patches were created against the master branch on 11/5/2011 and tested on FreeBSD 8.2(i386).

-Dave

diff -cr cxtracker_ORG/src/cxtracker.h cxtracker_PATCHED/src/cxtracker.h
*** cxtracker_ORG/src/cxtracker.h	Sat Nov 5 13:08:15 2011
--- cxtracker_PATCHED/src/cxtracker.h	Sat Nov 5 13:11:45 2011
***************
*** 26,31 ****
--- 26,35 ----
/* I N C L U D E S **********************************************************/
#include "ip.h"

+ #ifdef __FreeBSD__
+ #include
+ #endif /* __FreeBSD__ */
+
/* D E F I N E S ************************************************************/
#define VERSION "0.9.7"
#define TIMEOUT 45

diff -cr cxtracker_ORG/src/ip.c cxtracker_PATCHED/src/ip.c
*** cxtracker_ORG/src/ip.c	Sat Nov 5 13:08:15 2011
--- cxtracker_PATCHED/src/ip.c	Sat Nov 5 13:00:57 2011
***************
*** 24,30 ****
--- 24,33 ----
#include
#include
#include
+
+ #ifndef __FreeBSD__
#include
+ #endif /* __FreeBSD__ */

// private functions

diff -cr cxtracker_ORG/src/ip.h cxtracker_PATCHED/src/ip.h
*** cxtracker_ORG/src/ip.h	Sat Nov 5 13:08:15 2011
--- cxtracker_PATCHED/src/ip.h	Sat Nov 5 12:58:04 2011
***************
*** 26,31 ****
--- 26,35 ----
#include
#include

+ #ifdef __FreeBSD__
+ #include
+ #endif /* __FreeBSD__ */
+
#define IP_ADDRMAX NI_MAXHOST

// TODO: raise these values to deconflict with the NI_* flags