diff --git a/shairport.c b/shairport.c index 144bc0a8..03650693 100644 --- a/shairport.c +++ b/shairport.c @@ -24,11 +24,21 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "fcntl.h" +#include #include "socketlib.h" #include "shairport.h" + +#define DONT_USE_HAIRTUNES_MAIN #include "hairtunes.c" // couldn't figure out how to allow both mains. + +#ifndef TRUE +#define TRUE (-1) +#endif +#ifndef FALSE +#define FALSE (0) +#endif + // TEMP int kCurrentLogLevel = LOG_INFO; diff --git a/shairport.h b/shairport.h index f22320ee..f4e55315 100644 --- a/shairport.h +++ b/shairport.h @@ -1,15 +1,18 @@ -#include "stdio.h" -#include "string.h" -#include "unistd.h" -#include "openssl/bio.h" -#include "openssl/ssl.h" -#include "openssl/err.h" +#ifndef __SHAIRPORT_H__ +#define __SHAIRPORT_H__ + +#include +#include +#include +#include +#include +#include #include "socketlib.h" -#include "regex.h" +#include #include #include -#define DONT_USE_HAIRTUNES_MAIN + #define HWID_SIZE 6 #define SHAIRPORT_LOG 1 #define LOG_INFO 1 @@ -77,3 +80,5 @@ int buildAppleResponse(struct connection *pConn, char *pIpStr, char *pHwAddr); void sim(int pLevel, char *pValue1, char *pValue2); void slog(int pLevel, char *pFormat, ...); int isLogEnabledFor(int pLevel); + +#endif diff --git a/socketlib.h b/socketlib.h index 21241534..b66b56bd 100644 --- a/socketlib.h +++ b/socketlib.h @@ -10,6 +10,7 @@ #include #include #include +#include #define MAX_SIZE 8192