summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadna Vigo <arivigodr@gmail.com>2020-06-20 23:54:50 +0200
committerAriadna Vigo <arivigodr@gmail.com>2020-06-20 23:54:50 +0200
commit8fefa336f15a1ff852ef9da6f3a0a0a1276f8011 (patch)
tree0d0b2a36e93a03e87b323a403d65288f420b77f7
parent77d91a57f896a14746481dae1ddbf1fc02e13737 (diff)
Using int64_t for portability (OpenBSD)
-rw-r--r--cras.c1
-rw-r--r--tasklst.c3
-rw-r--r--tasklst.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/cras.c b/cras.c
index fca9af0..8afdf86 100644
--- a/cras.c
+++ b/cras.c
@@ -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>
diff --git a/tasklst.c b/tasklst.c
index f19aa0c..4ef1afb 100644
--- a/tasklst.c
+++ b/tasklst.c
@@ -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)
diff --git a/tasklst.h b/tasklst.h
index f365aa0..86e81a3 100644
--- a/tasklst.h
+++ b/tasklst.h
@@ -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;