aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2022-04-22 14:07:17 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2022-04-26 16:05:35 -0700
commiteee3969d7dcf3be9c3b831d993fcf49f55855a35 (patch)
tree27811f32be4fca90765dd73f48beb32f4143df36
parente5fe1a213698c6765ecf9aabddf1e461b50b9203 (diff)
downloadf2fs-tools-eee3969d7dcf3be9c3b831d993fcf49f55855a35.tar.gz
mkfs.f2fs: check uuid library
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--mkfs/f2fs_format.c3
-rw-r--r--tools/f2fscrypt.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index ce7d1c9..2759b5a 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -24,7 +24,8 @@
#include "config.h"
#ifdef HAVE_UUID_UUID_H
#include <uuid/uuid.h>
-#else
+#endif
+#ifndef HAVE_LIBUUID
#define uuid_parse(a, b) -1
#define uuid_generate(a)
#endif
diff --git a/tools/f2fscrypt.c b/tools/f2fscrypt.c
index f2fbf0b..4c5d870 100644
--- a/tools/f2fscrypt.c
+++ b/tools/f2fscrypt.c
@@ -356,7 +356,7 @@ static void parse_salt(char *salt_str, int flags)
perror("F2FS_IOC_GET_ENCRYPTION_PWSALT");
exit(1);
}
-#ifdef HAVE_UUID_UUID_H
+#ifdef HAVE_LIBUUID
if (options & OPT_VERBOSE) {
char tmp[80];
uuid_unparse(buf, tmp);
@@ -384,7 +384,7 @@ static void parse_salt(char *salt_str, int flags)
(((unsigned char)(h - hexchars) << 4) +
(unsigned char)(l - hexchars));
}
-#ifdef HAVE_UUID_UUID_H
+#ifdef HAVE_LIBUUID
} else if (uuid_parse(cp, buf) == 0) {
salt_len = 16;
#endif