Browse Source

linux/SDL_threadprio.c: fix build on older systems:

SCHED_RESET_ON_FORK is in kernel >= 2.6.32.
Ozkan Sezer 4 years ago
parent
commit
15cbddf497
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/core/linux/SDL_threadprio.c

+ 4 - 0
src/core/linux/SDL_threadprio.c

@@ -36,6 +36,10 @@
 #ifndef RLIMIT_RTTIME
 #define RLIMIT_RTTIME 15
 #endif
+/* SCHED_RESET_ON_FORK is in kernel >= 2.6.32. */
+#ifndef SCHED_RESET_ON_FORK
+#define SCHED_RESET_ON_FORK 0x40000000
+#endif
 
 #include "SDL_dbus.h"