summaryrefslogtreecommitdiff
path: root/libbcachefs/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/util.h')
-rw-r--r--libbcachefs/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbcachefs/util.h b/libbcachefs/util.h
index 80402b39..3196bc30 100644
--- a/libbcachefs/util.h
+++ b/libbcachefs/util.h
@@ -746,4 +746,13 @@ static inline int u8_cmp(u8 l, u8 r)
return cmp_int(l, r);
}
+#ifdef __KERNEL__
+static inline void uuid_unparse_lower(u8 *uuid, char *out)
+{
+ sprintf(out, "%plU", uuid);
+}
+#else
+#include <uuid/uuid.h>
+#endif
+
#endif /* _BCACHEFS_UTIL_H */