Changeset View
Changeset View
Standalone View
Standalone View
colorcorrection/clockskewnotifierengine_linux.cpp
Show All 18 Lines | |||||
19 | #include "clockskewnotifierengine_linux.h" | 19 | #include "clockskewnotifierengine_linux.h" | ||
20 | 20 | | |||
21 | #include <QSocketNotifier> | 21 | #include <QSocketNotifier> | ||
22 | 22 | | |||
23 | #include <fcntl.h> | 23 | #include <fcntl.h> | ||
24 | #include <sys/timerfd.h> | 24 | #include <sys/timerfd.h> | ||
25 | #include <unistd.h> | 25 | #include <unistd.h> | ||
26 | 26 | | |||
27 | #ifndef TFD_TIMER_CANCEL_ON_SET // only available in newer glib | ||||
28 | #define TFD_TIMER_CANCEL_ON_SET (1 << 1) | ||||
29 | #endif | ||||
30 | | ||||
27 | namespace KWin | 31 | namespace KWin | ||
28 | { | 32 | { | ||
29 | 33 | | |||
30 | LinuxClockSkewNotifierEngine *LinuxClockSkewNotifierEngine::create(QObject *parent) | 34 | LinuxClockSkewNotifierEngine *LinuxClockSkewNotifierEngine::create(QObject *parent) | ||
31 | { | 35 | { | ||
32 | const int fd = timerfd_create(CLOCK_REALTIME, O_CLOEXEC | O_NONBLOCK); | 36 | const int fd = timerfd_create(CLOCK_REALTIME, O_CLOEXEC | O_NONBLOCK); | ||
33 | if (fd == -1) { | 37 | if (fd == -1) { | ||
34 | qWarning("Couldn't create clock skew notifier engine: %s", strerror(errno)); | 38 | qWarning("Couldn't create clock skew notifier engine: %s", strerror(errno)); | ||
Show All 36 Lines |