Fix GDB build using mingw.org's MinGW
authorEli Zaretskii <eliz@gnu.org>
Thu, 19 Jul 2018 13:54:06 +0000 (16:54 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 19 Jul 2018 13:54:06 +0000 (16:54 +0300)
libiberty/
2018-07-18  Eli Zaretskii  <eliz@gnu.org>

PR gdb/23434
* libiberty/simple-object-elf.c (ENOTSUP): If not defined by
        errno.h, redirect ENOTSUP to ENOSYS.

libiberty/ChangeLog
libiberty/simple-object-elf.c

index c944f9ecc83edbbce66eafe9280b463442939cef..cde8bf7a8c101b0c3c56bec4731bee10c5440f33 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-18  Eli Zaretskii  <eliz@gnu.org>
+
+       PR gdb/23434
+       * libiberty/simple-object-elf.c (ENOTSUP): If not defined by
+        errno.h, redirect ENOTSUP to ENOSYS.
+
 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
 
        * configure.ac: Remove AC_PREREQ.
index 7468a1adc3dd1da2584d7324d98b9314a18f91ce..021ce488c16a74d33c0f486c3e83066cf5d4fa48 100644 (file)
@@ -22,6 +22,10 @@ Boston, MA 02110-1301, USA.  */
 #include "simple-object.h"
 
 #include <errno.h>
+/* mingw.org's MinGW doesn't have ENOTSUP.  */
+#ifndef ENOTSUP
+# define ENOTSUP ENOSYS
+#endif
 #include <stddef.h>
 
 #ifdef HAVE_STDLIB_H