Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some fixes

  • Loading branch information...
commit 2e4a080d5802e87212a1a4709c3779a3014270fc 1 parent 1f77088
@albertz albertz authored
Showing with 25 additions and 9 deletions.
  1. +11 −1 shairport.c
  2. +13 −8 shairport.h
  3. +1 −0  socketlib.h
View
12 shairport.c
@@ -24,11 +24,21 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "fcntl.h"
+#include <fcntl.h>
#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;
View
21 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 <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <openssl/bio.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
#include "socketlib.h"
-#include "regex.h"
+#include <regex.h>
#include <sys/types.h>
#include <regex.h>
-#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
View
1  socketlib.h
@@ -10,6 +10,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <sys/time.h>
#define MAX_SIZE 8192
Please sign in to comment.
Something went wrong with that request. Please try again.