Skip to content
This repository
Browse code

Merge pull request #3372 from bobo1on1/olddbus

fixed: compile with old versions of libdbus
  • Loading branch information...
commit eefb50dec6a1ae1726d91deebd11c2e82bf66150 2 parents 7a75ea5 + f41e95d
authored October 06, 2013
6  xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
@@ -38,6 +38,8 @@
38 38
 
39 39
 CLogindUPowerSyscall::CLogindUPowerSyscall()
40 40
 {
  41
+  m_delayLockFd = -1;
  42
+
41 43
   CLog::Log(LOGINFO, "Selected Logind/UPower as PowerSyscall");
42 44
 
43 45
   // Check if we have UPower. If not, we avoid any battery related operations.
@@ -264,6 +266,7 @@ bool CLogindUPowerSyscall::PumpPowerEvents(IPowerEventsCallback *callback)
264 266
 
265 267
 void CLogindUPowerSyscall::InhibitDelayLock()
266 268
 {
  269
+#ifdef DBUS_TYPE_UNIX_FD
267 270
   CDBusMessage message("org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", "Inhibit");
268 271
   message.AppendArgument("sleep"); // what to inhibit
269 272
   message.AppendArgument("XBMC"); // who
@@ -287,6 +290,9 @@ void CLogindUPowerSyscall::InhibitDelayLock()
287 290
   }
288 291
 
289 292
     CLog::Log(LOGDEBUG, "LogindUPowerSyscall - inhibit lock taken, fd %i", m_delayLockFd);
  293
+#else
  294
+    CLog::Log(LOGWARNING, "LogindUPowerSyscall - inhibit lock support not compiled in");
  295
+#endif
290 296
 }
291 297
 
292 298
 void CLogindUPowerSyscall::ReleaseDelayLock()

0 notes on commit eefb50d

Please sign in to comment.
Something went wrong with that request. Please try again.