diff -u -p -r1.87 bacon-video-widget-gst-0.10.c
--- src/backend/bacon-video-widget-gst-0.10.c	26 Sep 2006 17:01:01 -0000	1.87
+++ src/backend/bacon-video-widget-gst-0.10.c	17 Oct 2006 14:33:19 -0000
@@ -54,11 +54,14 @@
 #include <stdio.h>
 
 /* gtk+/gnome */
-#include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gconf/gconf-client.h>
 
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+
 #include "bacon-video-widget.h"
 #include "baconvideowidget-marshal.h"
 #include "video-utils.h"
@@ -493,13 +496,16 @@ static gboolean
 bacon_video_widget_expose_event (GtkWidget *widget, GdkEventExpose *event)
 {
   BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
-  GstXOverlay *xoverlay;
   gboolean draw_logo;
+#ifdef GDK_WINDOWING_X11
+  GstXOverlay *xoverlay;
   XID window;
+#endif
 
   if (event && event->count > 0)
     return TRUE;
 
+#ifdef GDK_WINDOWING_X11
   g_mutex_lock (bvw->priv->lock);
   xoverlay = bvw->priv->xoverlay;
   if (xoverlay == NULL) {
@@ -515,6 +521,7 @@ bacon_video_widget_expose_event (GtkWidg
 
   if (xoverlay != NULL && GST_IS_X_OVERLAY (xoverlay))
     gst_x_overlay_set_xwindow_id (xoverlay, window);
+#endif
 
   /* Start with a nice black canvas */
   gdk_draw_rectangle (widget->window, widget->style->black_gc, TRUE, 0, 0,
@@ -561,10 +568,13 @@ bacon_video_widget_expose_event (GtkWidg
                          widget->allocation.height);
     }
   } else {
+#ifdef GDK_WINDOWING_X11
     /* no logo, pass the expose to gst */
     if (xoverlay != NULL && GST_IS_X_OVERLAY (xoverlay))
       gst_x_overlay_expose (xoverlay);
-    else {
+    else
+#endif
+    {
       /* No xoverlay to expose yet */
       gdk_draw_rectangle (bvw->priv->video_window, widget->style->black_gc, 
                          TRUE, 0, 0,
@@ -572,8 +582,11 @@ bacon_video_widget_expose_event (GtkWidg
                          bvw->priv->video_window_allocation.height);
     }
   }
+
+#ifdef GDK_WINDOWING_X11
   if (xoverlay != NULL)
     gst_object_unref (xoverlay);
+#endif
 
   return TRUE;
 }
@@ -4394,6 +4407,7 @@ bvw_element_msg_sync (GstBus *bus, GstMe
   if (msg->structure == NULL)
     return;
 
+#ifdef GDK_WINDOWING_X11
   /* This only gets sent if we haven't set an ID yet. This is our last
    * chance to set it before the video sink will create its own window */
   if (gst_structure_has_name (msg->structure, "prepare-xwindow-id")) {
@@ -4411,6 +4425,9 @@ bvw_element_msg_sync (GstBus *bus, GstMe
     window = GDK_WINDOW_XWINDOW (bvw->priv->video_window);
     gst_x_overlay_set_xwindow_id (bvw->priv->xoverlay, window);
   }
+#else
+#warning Unimplemented
+#endif
 }
 
 static void

diff -u -p -r1.9 video-dev.c
--- src/video-dev.c	17 Mar 2005 23:47:28 -0000	1.9
+++ src/video-dev.c	17 Oct 2006 13:36:40 -0000
@@ -37,7 +37,6 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/ioctl.h>
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
diff -u -p -r1.9 totem-interface.c
--- src/totem-interface.c	30 Sep 2006 16:36:59 -0000	1.9
+++ src/totem-interface.c	17 Oct 2006 13:36:39 -0000
@@ -34,7 +34,9 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
+#endif
 
 #include "totem-interface.h"
 
@@ -181,6 +183,7 @@ totem_interface_get_full_path (const cha
 static GdkWindow *
 totem_gtk_plug_get_toplevel (GtkPlug *plug)
 {
+#ifdef GDK_WINDOWING_X11
 	Window root, parent, *children;
 	guint nchildren;
 	GdkNativeWindow xid;
@@ -207,6 +210,9 @@ totem_gtk_plug_get_toplevel (GtkPlug *pl
 		xid = parent;
 	}
 	while (TRUE);
+#else
+#warning Unsupported on this platform
+#endif
 }
 
 void
