From eae90d86b5e3dda10f541dadcea6462587ff2bfc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 2 Jan 2024 13:55:21 -0500 Subject: bfstd: Fix fflags type on OpenBSD --- src/bfstd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bfstd.c b/src/bfstd.c index a3e22f5..c0e61cb 100644 --- a/src/bfstd.c +++ b/src/bfstd.c @@ -609,8 +609,14 @@ error: int xstrtofflags(const char **str, unsigned long long *set, unsigned long long *clear) { #if BSD && !__GNU__ char *str_arg = (char *)*str; - unsigned long set_arg = 0; - unsigned long clear_arg = 0; + +#if __OpenBSD__ + typedef uint32_t fflags_t; +#else + typedef unsigned long fflags_t; +#endif + fflags_t set_arg = 0; + fflags_t clear_arg = 0; #if __NetBSD__ int ret = string_to_flags(&str_arg, &set_arg, &clear_arg); -- cgit v1.2.3