diff options
author | Maria Matejka <mq@ucw.cz> | 2023-01-20 14:07:38 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-01-20 18:31:57 +0100 |
commit | 343628d8c0f1848b968930f6dbabdd1174404b14 (patch) | |
tree | ab4e9fa467dc371529fc148c0fe1669864b47b74 /lib/settle.h | |
parent | 1127f19a7a12b162064b1f521acd5c0017fbcf89 (diff) |
Fixed various build problems on FreeBSD and/or CLang
Diffstat (limited to 'lib/settle.h')
-rw-r--r-- | lib/settle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/settle.h b/lib/settle.h index d274599d..e721f21f 100644 --- a/lib/settle.h +++ b/lib/settle.h @@ -32,7 +32,7 @@ struct settle { STATIC_ASSERT(OFFSETOF(struct settle, hook) == OFFSETOF(struct settle, tm) + OFFSETOF(timer, hook)); -#define SETTLE_INIT(_cfp, _hook, _data) (struct settle) { .tm = { .data = (_data), }, .hook = (_hook), .cf = ({ASSERT_DIE((_cfp)->min <= (_cfp)->max); *(_cfp); }), } +#define SETTLE_INIT(_cfp, _hook, _data) (struct settle) { .tm = { .data = (_data), .hook = TYPE_CAST(void (*)(struct settle *), void (*)(struct timer *), (_hook)), }, .cf = ({ASSERT_DIE((_cfp)->min <= (_cfp)->max); *(_cfp); }), } static inline void settle_init(struct settle *s, struct settle_config *cf, void (*hook)(struct settle *), void *data) |