diff options
-rw-r--r-- | sand-leek.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sand-leek.c b/sand-leek.c index b31009f..7cf0df1 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <getopt.h> #include <pthread.h> #include <semaphore.h> @@ -162,7 +163,7 @@ main(int argc, char **argv) { sem_init(&working, 0, 0); for (i = 0; i < thread_count; i++) { - if (pthread_create(&workers[i], NULL, work, &khash_count[i])) { + if (pthread_create(&workers[i], NULL, work, (void*)&khash_count[i])) { perror("pthread_create"); return 1; } |