diff -pruN 4.0.4-dfsg-1/debian/changelog 4.0.4-dfsg-2/debian/changelog
--- 4.0.4-dfsg-1/debian/changelog	2011-05-17 05:01:16.000000000 +0100
+++ 4.0.4-dfsg-2/debian/changelog	2011-05-17 04:44:38.000000000 +0100
@@ -1,3 +1,11 @@
+virtualbox-ose (4.0.4-dfsg-2) unstable; urgency=low
+
+  * Fix FTBFS with gcc 4.6. (Closes: #625658, #626148)
+    - Add 30-enable-gcc46.patch
+    - debian/LocalConfig.kmk: don't treat gcc warnings as errors.
+
+ -- Felix Geyer <debfx-pkg@fobos.de>  Thu, 12 May 2011 15:38:04 +0200
+
 virtualbox-ose (4.0.4-dfsg-1) unstable; urgency=low
 
   [ Felix Geyer ]
diff -pruN 4.0.4-dfsg-1/debian/LocalConfig.kmk 4.0.4-dfsg-2/debian/LocalConfig.kmk
--- 4.0.4-dfsg-1/debian/LocalConfig.kmk	2011-05-17 05:01:16.000000000 +0100
+++ 4.0.4-dfsg-2/debian/LocalConfig.kmk	2011-05-17 04:44:38.000000000 +0100
@@ -13,3 +13,4 @@ VBOX_PATH_APP_DOCS = /usr/share/doc/virt
 VBOX_WITH_VNC := 1
 VBOX_WITH_VBOXBFE :=
 VBOX_JAVA_HOME := /usr/lib/jvm/default-java
+VBOX_WITH_WARNINGS_AS_ERRORS =
diff -pruN 4.0.4-dfsg-1/debian/patches/30-enable-gcc46.patch 4.0.4-dfsg-2/debian/patches/30-enable-gcc46.patch
--- 4.0.4-dfsg-1/debian/patches/30-enable-gcc46.patch	1970-01-01 01:00:00.000000000 +0100
+++ 4.0.4-dfsg-2/debian/patches/30-enable-gcc46.patch	2011-05-17 04:44:38.000000000 +0100
@@ -0,0 +1,17 @@
+Description: Allow VirtualBox to be built with gcc 4.6.
+Origin: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-emulation/virtualbox/files/virtualbox-4.0.4-gcc46.patch?revision=1.1&view=markup
+
+--- VirtualBox-4.0.4_OSE.orig/configure	2011-02-18 00:30:48.000000000 +0800
++++ VirtualBox-4.0.4_OSE.orig/configure	2011-04-10 13:37:42.513743178 +0800
+@@ -409,9 +409,9 @@ check_gcc()
+       elif [ $cc_maj -lt 3 \
+              -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
+              -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
+-             -o \( $cc_maj -eq 4 -a $cc_min -gt 5 \) \
++             -o \( $cc_maj -eq 4 -a $cc_min -gt 6 \) \
+              -o $cc_maj -gt 4 ]; then
+-        log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<5"
++        log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<=6"
+         fail really
+       else
+         log_success "found version $cc_ver"
diff -pruN 4.0.4-dfsg-1/debian/patches/series 4.0.4-dfsg-2/debian/patches/series
--- 4.0.4-dfsg-1/debian/patches/series	2011-05-17 05:01:16.000000000 +0100
+++ 4.0.4-dfsg-2/debian/patches/series	2011-05-17 04:44:38.000000000 +0100
@@ -11,3 +11,4 @@
 27-hide-host-cache-warning.patch
 28-no-selinux-fedora.patch
 29-fix-ftbfs-as-needed.patch
+30-enable-gcc46.patch
