aboutsummaryrefslogtreecommitdiff
path: root/common/dl.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/dl.h')
-rw-r--r--common/dl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/common/dl.h b/common/dl.h
new file mode 100644
index 0000000..04a2cd7
--- /dev/null
+++ b/common/dl.h
@@ -0,0 +1,14 @@
+#ifndef _UWU_COMMON_DL_H_
+#define _UWU_COMMON_DL_H_
+
+#include <dlfcn.h>
+#include "err.h"
+
+inline static void check_dlerror()
+{
+ char *err = dlerror();
+ if (err)
+ error("library error: %s\n", err);
+}
+
+#endif