summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-02 13:55:21 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-02 13:55:21 -0500
commiteae90d86b5e3dda10f541dadcea6462587ff2bfc (patch)
treebbb5c61f6a9abe972cfd737eb8b660e27b8ee881 /src
parentee200c07643801c8b53e5b80df704ecbf77a884e (diff)
downloadbfs-eae90d86b5e3dda10f541dadcea6462587ff2bfc.tar.xz
bfstd: Fix fflags type on OpenBSD
Diffstat (limited to 'src')
-rw-r--r--src/bfstd.c10
1 files changed, 8 insertions, 2 deletions
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);