This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi! On 30 Mar 2012 11:43:09 -0000, drepper@sourceware.org wrote: > http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c030f70c8796c7743c3aa97d6beff3bd5b8dcd5d > > commit c030f70c8796c7743c3aa97d6beff3bd5b8dcd5d > Author: Ulrich Drepper <drepper@gmail.com> > Date: Fri Mar 30 07:42:29 2012 -0400 > > Speed up DNS by avoiding a system call if possible This patch adds a call to the (currently) Linux-specific sendmmsg to generic code: res_send.c: In function 'send_dg': res_send.c:1113:22: error: array type has incomplete element type struct mmsghdr reqs[2]; ^ res_send.c:1132:7: warning: implicit declaration of function 'sendmmsg' [-Wimplicit-function-declaration] int ndg = sendmmsg (pfd[0].fd, reqs, 2, MSG_NOSIGNAL); ^ > + * resolv/res_send.c (send_dg): Use sendmmsg if we have to write two > + requests to save a system call. > +++ b/resolv/res_send.c > [...] > + int ndg = sendmmsg (pfd[0].fd, reqs, 2, MSG_NOSIGNAL); How do people want me to solve this? a) Make the code use sendmmsg only if it is is available, or b) add a generic ENOSYS sendmmsg stub (appropriately versioned for 2.16/2.17) and move struct sendmmsg etc. to a generic place? (The existing code already does and has to do the correct thing if sendmmsg "returns" ENOSYS (and probes only once), as this will also happen with older Linux kernels.) I'd tend towards b) because we might add a sendmmsg implementation for GNU/Hurd later on. GrÃÃe, Thomas
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |