summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-06-07 23:18:40 +0000
committerjstebbins <[email protected]>2012-06-07 23:18:40 +0000
commit42f3324742a8aa77e65202e8549f5239e3d12d3a (patch)
tree2235e63d65e6b65eac413b7e1f1bb93ee8792efa /gtk/src/callbacks.c
parent156f480430db82fb3dd20bbdab26abc2665a9fb1 (diff)
Portability patches
gudev is only available on linux, so ifdef it out on all other systems. also add some definitions to the make system for generic gnu and freebsd systems. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4717 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 5173a6b29..228375f33 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -28,7 +28,9 @@
#if !defined(_WIN32)
#include <poll.h>
#define G_UDEV_API_IS_SUBJECT_TO_CHANGE 1
+#if defined(__linux__)
#include <gudev/gudev.h>
+#endif
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -49,6 +51,9 @@
#endif
#include <gdk/gdkx.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
#else
#define WINVER 0x0500
#include <winsock2.h>
@@ -3942,14 +3947,14 @@ dvd_device_list()
return dvd_devices;
}
-#if !defined(_WIN32)
+#if defined(__linux__)
static GUdevClient *udev_ctx = NULL;
#endif
gboolean
ghb_is_cd(GDrive *gd)
{
-#if !defined(_WIN32)
+#if defined(__linux__)
gchar *device;
GUdevDevice *udd;
@@ -3983,7 +3988,7 @@ ghb_is_cd(GDrive *gd)
void
ghb_udev_init()
{
-#if !defined(_WIN32)
+#if defined(__linux__)
udev_ctx = g_udev_client_new(NULL);
#endif
}