aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libctf/ChangeLog7
-rw-r--r--libctf/ctf-create.c4
-rw-r--r--libctf/ctf-subr.c4
3 files changed, 15 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 6887c3f..bbd807d 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index ee87575..b319476 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -24,6 +24,10 @@
#include <unistd.h>
#include <zlib.h>
+#ifndef EOVERFLOW
+#define EOVERFLOW ERANGE
+#endif
+
#ifndef roundup
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#endif
diff --git a/libctf/ctf-subr.c b/libctf/ctf-subr.c
index 455f18d..1586570 100644
--- a/libctf/ctf-subr.c
+++ b/libctf/ctf-subr.c
@@ -26,6 +26,10 @@
#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. */