diff -Naur transmission-2.21/configure.ac transmission-2.21-haiku/configure.ac
--- transmission-2.21/configure.ac	2011-02-08 22:14:33.063700992 +0100
+++ transmission-2.21-haiku/configure.ac	2011-02-22 02:05:20.924319744 +0100
@@ -85,7 +85,7 @@
 AC_C_INLINE
 if test "x$GCC" = "xyes" ; then
 
-    CFLAGS="$CFLAGS -std=gnu99 -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal"
+    CFLAGS="$CFLAGS -ggdb3 -Wall -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wwrite-strings -Winline"
 
     dnl figure out gcc version
     AC_MSG_CHECKING([gcc version])
@@ -95,6 +95,10 @@
     GCC_VERSION_NUM=`(expr $GCC_MAJOR "*" 100 + $GCC_MINOR) 2>/dev/null`
 
     AC_MSG_RESULT($GCC_VERSION)
+    if test $GCC_VERSION_NUM -ge 300; then
+        dnl these aren't in gcc 2
+        CFLAGS="$CFLAGS -std=gnu99 -Wmissing-format-attribute -Wunused-parameter -Wfloat-equal"
+    fi
     if test $GCC_VERSION_NUM -ge 304; then
         dnl these were added in 3.4
         CFLAGS="$CFLAGS -Wextra -Wdeclaration-after-statement -Winit-self"
diff -Naur transmission-2.21/third-party/miniupnp/connecthostport.c transmission-2.21-haiku/third-party/miniupnp/connecthostport.c
--- transmission-2.21/third-party/miniupnp/connecthostport.c	2011-02-08 22:14:30.000524288 +0100
+++ transmission-2.21-haiku/third-party/miniupnp/connecthostport.c	2011-02-22 02:05:20.925106176 +0100
@@ -31,6 +31,7 @@
 #ifndef USE_GETHOSTBYNAME
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/select.h>
 #endif /* #ifndef USE_GETHOSTBYNAME */
 #endif /* #else WIN32 */
 
