summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-01-14 14:46:43 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-01-14 14:46:43 +0200
commit2f5a57be4bcb4b6e641457ef0fc99bdbe84828ba (patch)
treeebd7f66e653955e3c3ff3fe18bf218ba2d22175f
parent3da8c2850d6589b9fa387ab2a2c87355d1224b1e (diff)
downloadtar-2f5a57be4bcb4b6e641457ef0fc99bdbe84828ba.tar.gz
Fix compilation without iconv.
-rw-r--r--src/utf8.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utf8.c b/src/utf8.c
index 91476aa9..53a1ab21 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -35,11 +35,14 @@
# define iconv_open(tocode, fromcode) ((iconv_t) -1)
# undef iconv
-# define iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft) ((size_t) 0)
+# define iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft) (errno = ENOSYS, (size_t) -1)
# undef iconv_close
# define iconv_close(cd) 0
+# undef iconv_t
+# define iconv_t int
+
#endif