This patch defends against no ENOTBLK definition.
libgm2/ChangeLog:
* libm2iso/ErrnoCategory.cc (IsErrnoHard): Defend against
lack of ENOTBLK.
(UnAvailable): Ditto.
(GetOpenResults): Ditto.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
{
#if defined(HAVE_ERRNO_H) || defined(HAVE_SYS_ERRNO_H)
return ((e == EPERM) || (e == ENOENT) || (e == EIO) || (e == ENXIO)
- || (e == EACCES) || (e == ENOTBLK) || (e == ENODEV) || (e == EINVAL)
+ || (e == EACCES) || (e == ENODEV) || (e == EINVAL)
+#ifdef ENOTBLK
+ || (e == ENOTBLK)
+#endif
|| (e == ENFILE) || (e == EROFS) || (e == EMLINK));
#else
return false;
{
#if defined(HAVE_ERRNO_H) || defined(HAVE_SYS_ERRNO_H)
return ((e == ENOENT) || (e == ESRCH) || (e == ENXIO) || (e == ECHILD)
- || (e == ENOTBLK) || (e == ENODEV) || (e == ENOTDIR));
+#ifdef ENOTBLK
+ || (e == ENOTBLK)
+#endif
+ || (e == ENODEV) || (e == ENOTDIR));
#else
return false;
#endif
case EACCES:
return wrongPermissions;
break;
+#ifdef ENOTBLK
case ENOTBLK:
return wrongFileType;
break;
+#endif
case EEXIST:
return fileExists;
break;