summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 23:21:03 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 23:21:03 -0300
commit5a98a48bd2749d81afd61fd1105850cf06534a27 (patch)
tree9265faf60a41efc75ac405085e0683ada00279b0
parent7b9e078cc7c9ff89915127a0a72dc5fc4ea53b46 (diff)
windows: Do not use S_ISREG in windows platform
-rw-r--r--src/lib/eina/eina_module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c
index 345ae20637..15d1d618ca 100644
--- a/src/lib/eina/eina_module.c
+++ b/src/lib/eina/eina_module.c
@@ -255,7 +255,12 @@ EINA_API Eina_Module *eina_module_new(const char *file)
255 (file[0] != '\0' && file[1] == ':' && file[2] == '\\')) 255 (file[0] != '\0' && file[1] == ':' && file[2] == '\\'))
256 { 256 {
257 if (stat(file, &st) == -1) return NULL; 257 if (stat(file, &st) == -1) return NULL;
258#ifdef _MSC_VER
259#define EINA_S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
260 if (!EINA_S_ISREG(st.st_mode)) return NULL;
261#else
258 if (!S_ISREG(st.st_mode)) return NULL; 262 if (!S_ISREG(st.st_mode)) return NULL;
263#endif
259 } 264 }
260 265
261 len = strlen(file); 266 len = strlen(file);