From 5ab1cb52b21fdc5524bd970e9b5cdff21a5bcabf Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Mon, 23 Dec 2019 20:23:02 +0000 Subject: fstyp(8): Fix WITHOUT_ICONV build Reported by: olivier --- usr.sbin/fstyp/ntfs.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr.sbin/fstyp/ntfs.c') diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c index d7e29c23fe85..440f5716392f 100644 --- a/usr.sbin/fstyp/ntfs.c +++ b/usr.sbin/fstyp/ntfs.c @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); #include +#ifdef WITH_ICONV #include +#endif #include #include #include @@ -94,6 +96,7 @@ struct ntfs_bootfile { uint32_t bf_volsn; } __packed; +#ifdef WITH_ICONV static void convert_label(const void *label /* LE */, size_t labellen, char *label_out, size_t label_sz) @@ -125,6 +128,7 @@ convert_label(const void *label /* LE */, size_t labellen, char *label_out, iconv_close(cd); } +#endif int fstyp_ntfs(FILE *fp, char *label, size_t size) @@ -142,6 +146,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512); if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) goto fail; +#ifdef WITH_ICONV if (!show_label) goto ok; @@ -171,6 +176,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) } ok: +#endif /* WITH_ICONV */ free(bf); free(filerecp); -- cgit v1.2.3