[tracker-miners/wip/lantw/Restore-fallback-code-for-non-Linux-system-in-tracker-sched.c] Restore fallback code for non-Linux system in tracker-sched.c
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/lantw/Restore-fallback-code-for-non-Linux-system-in-tracker-sched.c] Restore fallback code for non-Linux system in tracker-sched.c
- Date: Sun, 2 Feb 2020 10:38:22 +0000 (UTC)
commit 173d8db70400f588bd2025fe519ebe3cfeea0408
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]