summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_buffer/shm/ecore_buffer_shm.c6
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c6
-rw-r--r--src/modules/evas/image_loaders/generic/evas_image_load_generic.c6
3 files changed, 15 insertions, 3 deletions
diff --git a/src/modules/ecore_buffer/shm/ecore_buffer_shm.c b/src/modules/ecore_buffer/shm/ecore_buffer_shm.c
index 75900ea094..6440071dc5 100644
--- a/src/modules/ecore_buffer/shm/ecore_buffer_shm.c
+++ b/src/modules/ecore_buffer/shm/ecore_buffer_shm.c
@@ -14,6 +14,10 @@
14#include <Ecore.h> 14#include <Ecore.h>
15#include <Ecore_Buffer.h> 15#include <Ecore_Buffer.h>
16 16
17#ifndef O_BINARY
18# define O_BINARY 0
19#endif
20
17typedef struct _Ecore_Buffer_Shm_Data Ecore_Buffer_Shm_Data; 21typedef struct _Ecore_Buffer_Shm_Data Ecore_Buffer_Shm_Data;
18 22
19struct _Ecore_Buffer_Shm_Data { 23struct _Ecore_Buffer_Shm_Data {
@@ -102,7 +106,7 @@ _ecore_buffer_shm_buffer_export(Ecore_Buffer_Module_Data bmdata EINA_UNUSED, Eco
102 Ecore_Buffer_Shm_Data* b = bdata; 106 Ecore_Buffer_Shm_Data* b = bdata;
103 int fd; 107 int fd;
104 108
105 fd = open(b->file, O_RDWR | O_CLOEXEC); 109 fd = open(b->file, O_RDWR | O_BINARY | O_CLOEXEC);
106 if (id) *id = fd; 110 if (id) *id = fd;
107 111
108 return EXPORT_TYPE_FD; 112 return EXPORT_TYPE_FD;
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
index 245534fba3..28ffcc31f9 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
@@ -1,5 +1,9 @@
1#include "ecore_evas_extn_engine.h" 1#include "ecore_evas_extn_engine.h"
2 2
3#ifndef O_BINARY
4# define O_BINARY 0
5#endif
6
3struct _Extnbuf 7struct _Extnbuf
4{ 8{
5 const char *file, *lock; 9 const char *file, *lock;
@@ -165,7 +169,7 @@ _extnbuf_lock_file_set(Extnbuf *b, const char *file)
165 } 169 }
166 b->lock = eina_stringshare_add(file); 170 b->lock = eina_stringshare_add(file);
167 if (!b->lock) goto err; 171 if (!b->lock) goto err;
168 b->lockfd = open(b->lock, O_RDWR); 172 b->lockfd = open(b->lock, O_RDWR | O_BINARY);
169 if (b->lockfd >= 0) return EINA_TRUE; 173 if (b->lockfd >= 0) return EINA_TRUE;
170err: 174err:
171 if (b->lock) eina_stringshare_del(b->lock); 175 if (b->lock) eina_stringshare_del(b->lock);
diff --git a/src/modules/evas/image_loaders/generic/evas_image_load_generic.c b/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
index 78488d1036..3bca7c5ad3 100644
--- a/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
+++ b/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
@@ -16,6 +16,10 @@
16#include <fcntl.h> 16#include <fcntl.h>
17#include <ctype.h> 17#include <ctype.h>
18 18
19#ifndef O_BINARY
20# define O_BINARY 0
21#endif
22
19typedef struct _Evas_Loader_Internal Evas_Loader_Internal; 23typedef struct _Evas_Loader_Internal Evas_Loader_Internal;
20struct _Evas_Loader_Internal 24struct _Evas_Loader_Internal
21{ 25{
@@ -329,7 +333,7 @@ getdata:
329 333
330 // open 334 // open
331 if (tmpfname) 335 if (tmpfname)
332 fd = open(tmpfname, O_RDONLY, S_IRUSR); 336 fd = open(tmpfname, O_RDONLY | O_BINARY, S_IRUSR);
333#ifdef HAVE_SHM_OPEN 337#ifdef HAVE_SHM_OPEN
334 else if (shmfname) 338 else if (shmfname)
335 fd = shm_open(shmfname, O_RDONLY, S_IRUSR); 339 fd = shm_open(shmfname, O_RDONLY, S_IRUSR);