iconv: Always include errno.h when USE_ICONV is defined (#5251)

When USE_ICONV is defined, iconv.h references various errno constants,
but errno.h is only being included when HAVE_ICONV_H is not defined.
This causes build failures on at least GNU/Hurd.
This commit is contained in:
James McCoy 2016-08-25 22:02:40 -04:00 committed by Justin M. Keyes
parent 7bc627b3c8
commit 48dbb75ff6

View File

@ -24,10 +24,10 @@
// defined, we provide a type shim (pull in errno.h and define iconv_t).
// This enables us to still load and use iconv dynamically at runtime.
#ifdef USE_ICONV
# include <errno.h>
# ifdef HAVE_ICONV_H
# include <iconv.h>
# else
# include <errno.h>
typedef void *iconv_t;
# endif
#endif