Re: [uclibc-ng-devel] devel Digest, Vol 52, Issue 2

Hello, On Sat, Oct 06, 2018 at 12:00:02PM +0200, devel-request@uclibc-ng.org wrote: > Message: 1 > Date: Fri, 5 Oct 2018 07:48:40 -0600 > From: Lance Fredrickson <lancethepants@gmail.com> > To: devel@uclibc-ng.org > Subject: [uclibc-ng-devel] Fwd: recvmmsg/sendmmsg not in kernel < > Linux 2.6.33 > Message-ID: <fc65bbd1-8cfa-f4cb-9a5b-25e21a273494@gmail.com> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > > I'm having an issue where it seems recvmmsg/sendmmsg is being included > into the c library regardless of kernel version. I work with kernel > versions < 2.6.33 before this feature was included. When compiling > applications, autoconf is then mistakenly told from the c-library that > recvmmsg/sendmmsg is supported by the kernel, resulting in runtime > errors. I use buildroot to compile my toolchains. > > Looking through uclibc-ng git, it looks like this feature was added with > this commit. > https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=6e15fafa20066634a58d412b259b117a47ca46d1 +# ifdef __NR_recvmmsg ^^^^^^^^^^^^^ + return (ssize_t)INLINE_SYSCALL(recvmmsg, 5, sockfd, msg, vlen, flags, tmo); +# else ...... + return (ssize_t)__socketcall(SYS_RECVMMSG, args); +# endif +} You kernel define __NR_recvmmsg in unistd.h ? Best Regards Guo Ren

On 10/7/2018 8:12 AM, Guo Ren wrote:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=6e15fafa2006663... +# ifdef __NR_recvmmsg ^^^^^^^^^^^^^ + return (ssize_t)INLINE_SYSCALL(recvmmsg, 5, sockfd, msg, vlen, flags, tmo); +# else ...... + return (ssize_t)__socketcall(SYS_RECVMMSG, args); +# endif +}
You kernel define __NR_recvmmsg in unistd.h ?
Grepping through my toolchain the only occurrence of "__NR_recvmmsg" is the following. /* #define __NR_recvmmsg (__NR_Linux + 298) */ Which appears to be commented out, in include/asm/unistd.h include/sys/socket.h does contain some code referring to recvmmsg. I've linked both files here, the only place where such references are found. https://files.lancethepants.com/files/unistd.h https://files.lancethepants.com/files/socket.h This is the actual toolchain + libraries I use to natively compile apps on mipsel router with old kernel if you like to look at it. https://files.lancethepants.com/Tomatoware/v1.6/ This is a autoconf example bit that is detecting recvmmsg present. for ac_func in asprintf daemon fchmod flock fork gettimeofday mlockall putenv recvmmsg strsignal nanosleep unsetenv vsyslog devname fdevname do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 Lance
participants (2)
-
Guo Ren
-
Lance Fredrickson