diff options
author | Ariadna Vigo <arivigodr@gmail.com> | 2020-06-20 23:54:50 +0200 |
---|---|---|
committer | Ariadna Vigo <arivigodr@gmail.com> | 2020-06-20 23:54:50 +0200 |
commit | 8fefa336f15a1ff852ef9da6f3a0a0a1276f8011 (patch) | |
tree | 0d0b2a36e93a03e87b323a403d65288f420b77f7 | |
parent | 77d91a57f896a14746481dae1ddbf1fc02e13737 (diff) |
Using int64_t for portability (OpenBSD)
-rw-r--r-- | cras.c | 1 | ||||
-rw-r--r-- | tasklst.c | 3 | ||||
-rw-r--r-- | tasklst.h | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,7 @@ /* See LICENSE file for copyright and license details. */ #include <errno.h> +#include <inttypes.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ +#include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -109,7 +110,7 @@ tasklst_write_to_file(FILE *fp, TaskLst tasks) { int i; - fprintf(fp, "%zu\n", tasks.expiry); + fprintf(fp, "%" PRId64 "\n", tasks.expiry); for (i = 0; i < TASK_LST_MAX_NUM; ++i) { if (tasks.status[i] == TASK_VOID) @@ -11,7 +11,7 @@ enum { }; typedef struct { - time_t expiry; + int64_t expiry; int status[TASK_LST_MAX_NUM]; char tdesc[TASK_LST_MAX_NUM][TASK_LST_DESC_MAX_SIZE]; } TaskLst; |