File: fix_temp_arrays.patch

package info (click to toggle)
simka 1.5.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,204 kB
  • sloc: cpp: 5,321; python: 672; sh: 386; makefile: 26
file content (17 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: separate out array as a defined struct
 Some (newer) GCC throw error when accessing the address of a temporary array, so separate the array as a defined struct to prevent this address issue. 
Last-Update: 2019-09-16
---

--- simka.orig/src/minikc/SimkaCountProcess.cpp
+++ simka/src/minikc/SimkaCountProcess.cpp
@@ -22,7 +22,8 @@
 	int nbTries = 0;
 	while(ret != 0){
 		ret = system(command.c_str());
-		nanosleep((const struct timespec[]){{0, 10000000L}}, NULL);
+		struct timespec ts = {0, 100000000L};
+		nanosleep(&ts, NULL);
 		if(nbTries > 3) exit(1);
 		nbTries += 1;
 	}