diff options
author | Lee Salzman <[email protected]> | 2013-08-16 01:18:21 +0300 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2013-08-16 01:18:21 +0300 |
commit | c0713c47e664341c16cb46717d6ef031e92ea085 (patch) | |
tree | 8aef3b506b52eca7d9dc23d167e9a6f040994e2e /unix.c | |
parent | 3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb (diff) | |
download | enet-c0713c47e664341c16cb46717d6ef031e92ea085.tar.gz enet-c0713c47e664341c16cb46717d6ef031e92ea085.zip |
more ENET_SOCKOPT_ERROR fixes
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -275,10 +275,12 @@ int enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) { int result = -1; + socklen_t len; switch (option) { case ENET_SOCKOPT_ERROR: - result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int)); + len = sizeof (int); + result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len); break; default: |