[tracker-miners/tracker-miners-2.3: 2/4] Restore fallback code for non-Linux system in tracker-sched.c
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/tracker-miners-2.3: 2/4] Restore fallback code for non-Linux system in tracker-sched.c
- Date: Sun, 2 Feb 2020 20:02:55 +0000 (UTC)
commit 59620ce652e2652a757423cb34a290193aee4f32
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sun Feb 2 18:33:47 2020 +0800
Restore fallback code for non-Linux system in tracker-sched.c
Commit d85f3e858b5e00a5e06f7101ff4cee47d178cdff removes the fallback
code for non-Linux system. Since SCHED_IDLE is a Linux-specific feature,
it causes the file to fail to compile on non-Linux system. Restore the
fallback code to fix the build.
src/libtracker-miners-common/tracker-sched.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/src/libtracker-miners-common/tracker-sched.c b/src/libtracker-miners-common/tracker-sched.c
index b7a3bc232..4a87f7a02 100644
--- a/src/libtracker-miners-common/tracker-sched.c
+++ b/src/libtracker-miners-common/tracker-sched.c
@@ -20,6 +20,8 @@
#include "config-miners.h"
+#ifdef __linux__
+
#include <pthread.h>
#include "tracker-sched.h"
@@ -54,3 +56,17 @@ tracker_sched_idle (void)
return FALSE;
}
}
+
+#else /* __linux__ */
+
+#include <glib.h>
+
+#include "tracker-sched.h"
+
+gboolean
+tracker_sched_idle (void)
+{
+ return TRUE;
+}
+
+#endif /* __linux__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]