Просмотр исходного кода

fix compile under darwin: sched_setscheduler does not exist

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1023 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabien Thomas 20 лет назад
Родитель
Сommit
e472131c0e
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      test/subscription.c

+ 4 - 0
test/subscription.c

@@ -373,9 +373,11 @@ evt_free:
 
 static int err_wait_time = -1;
 
+#if defined(OPENAIS_BSD) || defined(OPENAIS_LINUX)
 static struct sched_param sched_param = {
 	sched_priority: 1
 };
+#endif
 
 int main (int argc, char **argv)
 {
@@ -384,7 +386,9 @@ int main (int argc, char **argv)
 	int option;
 	char *p;
 
+#if defined(OPENAIS_BSD) || defined(OPENAIS_LINUX)
 	sched_setscheduler (0, SCHED_RR, &sched_param);
+#endif
 
 	while (1) {
 		option = getopt(argc, argv, opts);