Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/fstyp PR/56530: RVP: fix iconv open error.
details: https://anonhg.NetBSD.org/src/rev/a49432f025e0
branches: trunk
changeset: 1026602:a49432f025e0
user: christos <christos%NetBSD.org@localhost>
date: Thu Dec 02 14:26:12 2021 +0000
description:
PR/56530: RVP: fix iconv open error.
diffstat:
usr.sbin/fstyp/ntfs.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 1d26602dab37 -r a49432f025e0 usr.sbin/fstyp/ntfs.c
--- a/usr.sbin/fstyp/ntfs.c Thu Dec 02 13:26:39 2021 +0000
+++ b/usr.sbin/fstyp/ntfs.c Thu Dec 02 14:26:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs.c,v 1.2 2019/12/28 08:22:30 tkusumi Exp $ */
+/* $NetBSD: ntfs.c,v 1.3 2021/12/02 14:26:12 christos Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -35,10 +35,11 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: ntfs.c,v 1.2 2019/12/28 08:22:30 tkusumi Exp $");
+__RCSID("$NetBSD: ntfs.c,v 1.3 2021/12/02 14:26:12 christos Exp $");
#include <err.h>
#include <iconv.h>
+#include <langinfo.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -108,8 +109,7 @@
iconv_t cd;
size_t rc;
- /* dstname="" means convert to the current locale. */
- cd = iconv_open("", NTFS_ENC);
+ cd = iconv_open(nl_langinfo(CODESET), NTFS_ENC);
if (cd == (iconv_t)-1) {
warn("ntfs: Could not open iconv");
return;
Home |
Main Index |
Thread Index |
Old Index