diff --git a/src/Main/screensaver_control.cxx b/src/Main/screensaver_control.cxx index 0af20eb42..f6a33fee4 100644 --- a/src/Main/screensaver_control.cxx +++ b/src/Main/screensaver_control.cxx @@ -20,9 +20,9 @@ // // $Id$ -#ifdef HAVE_CONFIG_H -# include -#endif +#include +#include + #ifdef HAVE_DBUS #include //Uses the low-level libdbus rather than GDBus/QtDBus to avoid adding more dependencies than necessary. http://dbus.freedesktop.org/doc/api/html/index.html #endif @@ -38,7 +38,7 @@ */ void fgOSDisableScreensaver() { -#ifdef HAVE_DBUS +#if defined(HAVE_DBUS) && defined(SG_UNIX) && !defined(SG_MAC) DBusConnection *dbus_connection; DBusMessage *dbus_inhibit_screenlock; unsigned int window_id=1000;//fake-it doesn't seem to care