File: initialize-nsdate-before-threads-locks.diff

package info (click to toggle)
oolite 1.84-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 124,644 kB
  • ctags: 3,975
  • sloc: objc: 132,132; ansic: 3,138; sh: 559; perl: 359; makefile: 276; php: 5
file content (26 lines) | stat: -rw-r--r-- 689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Initialize NSDate before playing with threads and locks.
Origin: http://lists.gnu.org/archive/html/gnustep-dev/2016-08/msg00002.html
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833134
Author: Richard Frith-Macdonald

--- a/src/SDL/main.m
+++ b/src/SDL/main.m
@@ -25,6 +25,7 @@
 
 #ifdef GNUSTEP
 #import <Foundation/NSAutoreleasePool.h>
+#import <Foundation/NSDate.h>
 #import <Foundation/NSString.h>
 
 #import "GameController.h"
@@ -47,6 +48,10 @@
 {
 #ifdef GNUSTEP
 	int i;
+
+	// Initialize NSDate before playing with threads and locks.
+	// http://lists.gnu.org/archive/html/gnustep-dev/2016-08/msg00002.html
+	[NSDate class];
 	
 #if OOLITE_WINDOWS