Bladeren bron

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 jaren geleden
bovenliggende
commit
e472131c0e
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4 0
      test/subscription.c

+ 4 - 0
test/subscription.c

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