summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/sockopt.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1999-12-17 12:43:06 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1999-12-17 12:43:06 +0000
commitf6b30a323d2dac8b27cc3ad325458ec18cb31582 (patch)
tree25e6ce0c8d65ddbc98fcee4e2ccab8242f54c112 /otherlibs/unix/sockopt.c
parent441e2668c4d31a82df01819ff06d806f39d85a50 (diff)
Utilisation de socklen_t
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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)