This commit fixes a compilation failure in a couple of libctf files
due to the use of EOVERFLOW and ENOTSUP, which are not defined
when compiling on MinGW.
libctf/ChangeLog:
PR binutils/25155:
* ctf-create.c (EOVERFLOW): If not defined by system header,
redirect to ERANGE as a poor man's substitute.
* ctf-subr.c (ENOTSUP): If not defined, use ENOSYS instead.
(cherry picked from commit
50500ecfefd6acc4c7f6c2a95bc0ae1945103220)
+2020-07-26 Eli Zaretskii <eliz@gnu.org>
+
+ PR binutils/25155:
+ * ctf-create.c (EOVERFLOW): If not defined by system header,
+ redirect to ERANGE as a poor man's substitute.
+ * ctf-subr.c (ENOTSUP): If not defined, use ENOSYS instead.
+
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
* ctf-create.c (ctf_dtd_insert): Add uintptr_t casts.
#include <unistd.h>
#include <zlib.h>
+#ifndef EOVERFLOW
+#define EOVERFLOW ERANGE
+#endif
+
#ifndef roundup
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#endif
#include <string.h>
#include <unistd.h>
+#ifndef ENOTSUP
+#define ENOTSUP ENOSYS
+#endif
+
int _libctf_version = CTF_VERSION; /* Library client version. */
int _libctf_debug = 0; /* Debugging messages enabled. */