diff -ur rtmpdump.orig/bytes.h rtmpdump.new/bytes.h
--- rtmpdump.orig/bytes.h	2009-03-11 22:55:44.000000000 +0100
+++ rtmpdump.new/bytes.h	2009-03-18 16:56:54.000000000 +0100
@@ -34,11 +34,16 @@
       | (((x) & 0x00000000000000ffull) << 56))

 #else
-#include <endian.h>
-#include <byteswap.h>
+#include <sys/endian.h>
+#define __BIG_ENDIAN    _BIG_ENDIAN
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BYTE_ORDER _BYTE_ORDER
+#define __FLOAT_WORD_ORDER _BYTE_ORDER
+#define __bswap_32(x)   bswap32(x)
+#define __bswap_64(x)   bswap64(x)

-typedef __uint64_t uint64_t;
-typedef __uint32_t uint32_t;
+/* typedef __uint64_t uint64_t; */
+/* typedef __uint32_t uint32_t; */
 #endif

 #if !defined(__BYTE_ORDER) || !defined(__FLOAT_WORD_ORDER)
diff -ur rtmpdump.orig/rtmp.h rtmpdump.new/rtmp.h
--- rtmpdump.orig/rtmp.h	2009-03-11 22:37:17.000000000 +0100
+++ rtmpdump.new/rtmp.h	2009-03-18 16:59:27.000000000 +0100
@@ -28,11 +28,11 @@
 #ifdef WIN32
 #else
 //#include <sys/types.h>
-//#include <sys/socket.h>
+#include <sys/socket.h>
 #include <netdb.h>
 #include <arpa/inet.h>
 //#include <unistd.h>
-//#include <netinet/in.h>
+#include <netinet/in.h>
 #endif

 #include "AMFObject.h"

