From 040153adcb22a60936ecf67b568b5dd96eaa95fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Wed, 4 May 2016 09:59:18 +0200 Subject: [PATCH] Redefined ELIBBAD as ENOEXEC when missing When a plugin cannot be initialized a ELIBBAD error is returned on Linux and OpenIndiana. As this is not a Posix error code, use ENOEXEC on systems which do not define ELIBBAD. --- include/ntfs-3g/compat.h | 4 ++++ src/ntfs-3g_common.c | 1 + 2 files changed, 5 insertions(+) diff --git a/include/ntfs-3g/compat.h b/include/ntfs-3g/compat.h index ece7ba8f..ded6c5f8 100644 --- a/include/ntfs-3g/compat.h +++ b/include/ntfs-3g/compat.h @@ -37,6 +37,10 @@ #define ENODATA ENOENT #endif +#ifndef ELIBBAD +#define ELIBBAD ENOEXEC +#endif + #ifndef PATH_MAX #define PATH_MAX 4096 #endif diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index 29fa42c0..edb4ec41 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -47,6 +47,7 @@ #include #include +#include "compat.h" #include "inode.h" #include "dir.h" #include "security.h"