summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-03-28 15:25:39 -0300
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-03-29 12:44:19 -0300
commit9486225744efdc9a68813f0d34f4e38e04387567 (patch)
tree0f2a4ae79ff9c2d01c30dfdd92a4e717d7890534
parent13a8842614a50706d5d6a2bf172e98bd9a032024 (diff)
ecore_con: remove warnings if FD_CLOEXEC is undefined.
currently it's being defined in evil_fcntl.h, but the actual implementation of fcntl() in evil_fcntl.c is causing problems with sockets. So one possibility is to remove the ifdef, another is to change the implementation.
-rw-r--r--src/lib/ecore_con/ecore_con.c3
-rw-r--r--src/lib/ecore_con/efl_net_server_fd.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 6ab3276370..64ac60f910 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -598,6 +598,9 @@ efl_net_socket4(int domain, int type, int protocol, Eina_Bool close_on_exec)
598 } 598 }
599 } 599 }
600 EINA_THREAD_CLEANUP_POP(EINA_FALSE); /* we need fd on success */ 600 EINA_THREAD_CLEANUP_POP(EINA_FALSE); /* we need fd on success */
601#else
602 DBG("close on exec is not supported on your platform");
603 (void)close_on_exec;
601#endif 604#endif
602 605
603 return fd; 606 return fd;
diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c
index deb1962929..0c76af28fa 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -60,6 +60,8 @@ efl_net_accept4(SOCKET fd, struct sockaddr *addr, socklen_t *addrlen, Eina_Bool
60 return INVALID_SOCKET; 60 return INVALID_SOCKET;
61 } 61 }
62 } 62 }
63#else
64 (void)close_on_exec;
63#endif 65#endif
64 66
65 return client; 67 return client;
@@ -295,6 +297,10 @@ _efl_net_server_fd_close_on_exec_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo
295 pd->close_on_exec = old; 297 pd->close_on_exec = old;
296 return EINA_FALSE; 298 return EINA_FALSE;
297 } 299 }
300#else
301 DBG("close on exec is not supported on your platform");
302 (void)close_on_exec;
303 (void)o;
298#endif 304#endif
299 305
300 return EINA_TRUE; 306 return EINA_TRUE;
@@ -321,6 +327,8 @@ _efl_net_server_fd_close_on_exec_get(Eo *o, Efl_Net_Server_Fd_Data *pd)
321 } 327 }
322 328
323 pd->close_on_exec = !!(flags & FD_CLOEXEC); /* sync */ 329 pd->close_on_exec = !!(flags & FD_CLOEXEC); /* sync */
330#else
331 (void)o;
324#endif 332#endif
325 return pd->close_on_exec; 333 return pd->close_on_exec;
326} 334}