bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOMAXCONN


From: Mark Kettenis
Subject: Re: SOMAXCONN
Date: Wed, 25 Jul 2001 23:52:00 +0200

   From: Roland McGrath <roland@gnu.org>
   Date: Wed, 25 Jul 2001 17:08:04 -0400 (EDT)

   > Yup.  The only thing that we hadn't worked out yet was the actual
   > definition of SOMAXCONN.  If you agree that 128 is a sensible value,
   > I'll put the new file in sysdeps/unix/bsd4.4/bits.

   Yes, please do.

Done.  This means we have to fiddle the pfinet glue-include stuff a
bit though, otherwise it won't compile anymore.  How about the
attached patch?  The put_cmsg() duplication is a bit odd, but we
should probably change the second one to do something useful.


Index: pfinet/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

        * glue-include/linux/socket.h (SOMAXCONN): Only define if it
        wasn't already.
        (msg_control, msg_controllen, struct cmsghdr, cmsg_len, cmsg_type,
        cmsg_level, CMSG_FIRSTHDR, CMSG_NXTHDR, CMSG_DATA, CMSG_LEN): Only
        define if CMSG_DATA wasn't already defined.

Index: pfinet/glue-include/linux/socket.h
===================================================================
RCS file: /cvsroot/hurd/hurd/pfinet/glue-include/linux/socket.h,v
retrieving revision 1.2
diff -u -p -r1.2 socket.h
--- pfinet/glue-include/linux/socket.h 2000/02/07 02:25:46 1.2
+++ pfinet/glue-include/linux/socket.h 2001/07/25 21:48:30
@@ -48,9 +48,11 @@
 #define        SO_BSDCOMPAT 192
 
 /* Maximum queue length specifiable by listen.  */
+#ifndef SOMAXCONN
 #define SOMAXCONN      128
+#endif
 
-/* XXX */
+#ifndef CMSG_DATA
 #define msg_control    msg_accrights
 #define msg_controllen msg_accrightslen
 struct cmsghdr { int cmsg_garbage; };
@@ -65,7 +67,11 @@ put_cmsg(struct msghdr *msg, int level, 
 #define CMSG_DATA(cmsg)                (0)
 #define CMSG_ALIGN(size)       (0)
 #define CMSG_LEN(size)                 (0)
-
+#else
+static inline int
+put_cmsg(struct msghdr *msg, int level, int type, int len, void *data)
+{ return 0; }
+#endif
 
 #define MSG_NOSIGNAL   0
 #define MSG_ERRQUEUE   0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]