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;
}
|