aboutsummaryrefslogtreecommitdiffstats
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-28 15:25:39 -0300
commit096f389e60d0a809c2414c9dcd3adbf5c0dd51cf (patch)
treefced125234aa15d3bbd582c62abdb513f99ef5ae
parenteina: fix compilation warning on _WIN32 due missing strndup() (diff)
downloadefl-096f389e60d0a809c2414c9dcd3adbf5c0dd51cf.tar.gz
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)
}
}
EINA_THREAD_CLEANUP_POP(EINA_FALSE); /* we need fd on success */
+#else
+ DBG("close on exec is not supported on your platform");
+ (void)close_on_exec;
#endif
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
return INVALID_SOCKET;
}
}
+#else
+ (void)close_on_exec;
#endif
return client;
@@ -295,6 +297,10 @@ _efl_net_server_fd_close_on_exec_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo
pd->close_on_exec = old;
return EINA_FALSE;
}
+#else
+ DBG("close on exec is not supported on your platform");
+ (void)close_on_exec;
+ (void)o;
#endif
return EINA_TRUE;
@@ -321,6 +327,8 @@ _efl_net_server_fd_close_on_exec_get(Eo *o, Efl_Net_Server_Fd_Data *pd)
}
pd->close_on_exec = !!(flags & FD_CLOEXEC); /* sync */
+#else
+ (void)o;
#endif
return pd->close_on_exec;
}