aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.h b/util.h
index 683dbd4a..3746e269 100644
--- a/util.h
+++ b/util.h
@@ -1,12 +1,20 @@
#pragma once
+#include <stdbool.h>
#include <stdint.h>
+#include <string.h>
#include <threads.h>
#define ALEN(v) (sizeof(v) / sizeof((v)[0]))
#define min(x, y) ((x) < (y) ? (x) : (y))
#define max(x, y) ((x) > (y) ? (x) : (y))
+static inline bool
+streq(const char *a, const char *b)
+{
+ return strcmp(a, b) == 0;
+}
+
static inline const char *
thrd_err_as_string(int thrd_err)
{