git: c429893a658a - stable/13 - fstyp: fix build WITHOUT_ICONV
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Feb 2022 21:45:37 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c429893a658afb19ad58a7e858facc138e84cb7c commit c429893a658afb19ad58a7e858facc138e84cb7c Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-11-02 13:43:56 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-02-08 20:50:32 +0000 fstyp: fix build WITHOUT_ICONV Reported by: Michael Dexter, Build Option Survey Sponsored by: The FreeBSD Foundation (cherry picked from commit 3513df4bcc172b2b7b923ba62591490d5df1bf5a) --- usr.sbin/fstyp/exfat.c | 5 +++++ usr.sbin/fstyp/ntfs.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/usr.sbin/fstyp/exfat.c b/usr.sbin/fstyp/exfat.c index 3f10cb6a9e5a..d92d9c828427 100644 --- a/usr.sbin/fstyp/exfat.c +++ b/usr.sbin/fstyp/exfat.c @@ -365,6 +365,11 @@ fstyp_exfat(FILE *fp, char *label, size_t size) #ifdef WITH_ICONV if (show_label) exfat_find_label(fp, ev, bytespersec, label, size); +#else + if (show_label) { + warnx("label not available without iconv support"); + memset(label, 0, size); + } #endif out: diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c index 0ce1fa81181a..c286d950dc2b 100644 --- a/usr.sbin/fstyp/ntfs.c +++ b/usr.sbin/fstyp/ntfs.c @@ -179,6 +179,11 @@ fstyp_ntfs(FILE *fp, char *label, size_t size) } ok: +#else + if (show_label) { + warnx("label not available without iconv support"); + memset(label, 0, size); + } #endif /* WITH_ICONV */ free(bf); free(filerecp);