summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/sockopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/sockopt.c')
-rw-r--r--otherlibs/unix/sockopt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/otherlibs/unix/sockopt.c b/otherlibs/unix/sockopt.c
index 93786d6bb..250986716 100644
--- a/otherlibs/unix/sockopt.c
+++ b/otherlibs/unix/sockopt.c
@@ -33,7 +33,12 @@ static int sockopt[] = {
value unix_getsockopt(value socket, value option)
{
- int optval, optsize;
+ int optval;
+#ifdef HAS_SOCKLEN_T
+ socklen_t optsize;
+#else
+ int optsize;
+#endif
optsize = sizeof(optval);
if (getsockopt(Int_val(socket), SOL_SOCKET, sockopt[Int_val(option)],
(void *) &optval, &optsize) == -1)