aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorleso-kn <info@lesosoftware.com>2023-10-23 21:35:10 +0200
committerCaleb Maclennan <caleb@alerque.com>2023-10-27 09:59:26 +0300
commit0bc8c56043e9fee5403516c62618b7d3acc5508a (patch)
tree12a3970555e801ef8e0ab375ee4fa0c3b92a4ba7 /src
parentf741a88b80ffcf4de65b91ff82fc9f7865cbad0e (diff)
downloadluasocket-0bc8c56043e9fee5403516c62618b7d3acc5508a.tar.gz
luasocket-0bc8c56043e9fee5403516c62618b7d3acc5508a.tar.bz2
luasocket-0bc8c56043e9fee5403516c62618b7d3acc5508a.zip
fix(core): Disable SO_BINDTODEVICE on windows
Co-authored-by: Sewbacca <sebastian.kalus@kolabnow.com>
Diffstat (limited to 'src')
-rw-r--r--src/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/options.c b/src/options.c
index 3856797..6581cae 100644
--- a/src/options.c
+++ b/src/options.c
@@ -58,7 +58,7 @@ int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps)
58/* binds socket to network interface */ 58/* binds socket to network interface */
59int opt_set_bindtodevice(lua_State *L, p_socket ps) 59int opt_set_bindtodevice(lua_State *L, p_socket ps)
60{ 60{
61#ifdef __APPLE__ 61#if defined(__APPLE__) || defined(__WIN32__) || defined(_MSC_VER)
62 return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); 62 return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system");
63#else 63#else
64 const char *dev = luaL_checkstring(L, 3); 64 const char *dev = luaL_checkstring(L, 3);
@@ -68,7 +68,7 @@ int opt_set_bindtodevice(lua_State *L, p_socket ps)
68 68
69int opt_get_bindtodevice(lua_State *L, p_socket ps) 69int opt_get_bindtodevice(lua_State *L, p_socket ps)
70{ 70{
71#ifdef __APPLE__ 71#if defined(__APPLE__) || defined(__WIN32__) || defined(_MSC_VER)
72 return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); 72 return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system");
73#else 73#else
74 char dev[IFNAMSIZ]; 74 char dev[IFNAMSIZ];