summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2017-08-14 15:50:03 +0200
committerCedric BAIL <cedric@osg.samsung.com>2017-08-14 10:17:24 -0700
commit45bcc87e76650290f7e216f2cc103985558bf7ee (patch)
treef9cb7bf6fb7f786724b723288e4da76f3d83690a /src/lib/eio
parentd0469d52ed729e9be2059ea7c596495c98c175dc (diff)
eio: fix correct stat structure on Windows 32 bits
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/eio_private.h14
-rw-r--r--src/lib/eio/eio_single.c2
2 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/eio/eio_private.h b/src/lib/eio/eio_private.h
index f1466b681a..a81d94f3fa 100644
--- a/src/lib/eio/eio_private.h
+++ b/src/lib/eio/eio_private.h
@@ -56,13 +56,19 @@
56#include "Eio.h" 56#include "Eio.h"
57 57
58#ifdef _WIN32 58#ifdef _WIN32
59# ifdef _WIN64
59typedef struct __stat64 _eio_stat_t; 60typedef struct __stat64 _eio_stat_t;
60#define _eio_stat(p, b) _stat64(p, b) 61# define _eio_stat(p, b) _stat64(p, b)
61#define _eio_lstat(p, b) _stat64(p, b) 62# define _eio_lstat(p, b) _stat64(p, b)
63# else
64typedef struct _stat _eio_stat_t;
65# define _eio_stat(p, b) _stat(p, b)
66# define _eio_lstat(p, b) _stat(p, b)
67# endif
62#else 68#else
63typedef struct stat _eio_stat_t; 69typedef struct stat _eio_stat_t;
64#define _eio_stat(p, b) stat(p, b) 70# define _eio_stat(p, b) stat(p, b)
65#define _eio_lstat(p, b) lstat(p, b) 71# define _eio_lstat(p, b) lstat(p, b)
66 72
67# include <grp.h> 73# include <grp.h>
68# include <pwd.h> 74# include <pwd.h>
diff --git a/src/lib/eio/eio_single.c b/src/lib/eio/eio_single.c
index b2a7a4992d..fb8e8264fc 100644
--- a/src/lib/eio/eio_single.c
+++ b/src/lib/eio/eio_single.c
@@ -155,7 +155,7 @@ static void
155_eio_file_lstat(void *data, Ecore_Thread *thread) 155_eio_file_lstat(void *data, Ecore_Thread *thread)
156{ 156{
157 Eio_File_Stat *s = data; 157 Eio_File_Stat *s = data;
158 struct stat buf; 158 _eio_stat_t buf;
159 159
160 if (_eio_lstat(s->path, &buf) != 0) 160 if (_eio_lstat(s->path, &buf) != 0)
161 eio_file_thread_error(&s->common, thread); 161 eio_file_thread_error(&s->common, thread);