[osv-dev] [PATCH] libc: point 3 more files from libc/ to musl/

2020-08-10 Thread Waldemar Kozaczuk
This patch adds 2 aliases using aliases.ld so that we can point 3 files from libc/ to musl/. One of the files simply has not changed significantly on musl side so we point it to musl/ version. The diff between libc/ and musl/src/ versions: ``` DIFF: [/multibyte/mbrlen.c] 12c12 < #include

Re: [osv-dev] [RFC 2] libc: replace syscall call with variadic macro and inlined function

2020-08-10 Thread Waldek Kozaczuk
On Monday, August 10, 2020 at 1:58:51 AM UTC-4 Nadav Har'El wrote: > On Mon, Aug 10, 2020 at 8:02 AM Waldemar Kozaczuk > wrote: > >> In more complicated situations when single musl file >> calls syscall() for 2 or more system call types (like stdio/tmpnam.o), >> we cannot have single macro

[osv-dev] include/api/$ARCH/bits/alltypes.h.sh and musl upgrade

2020-08-10 Thread Waldek Kozaczuk
Can anyone explain the motivation behind this script and how the generated alltypes.h is intended to be used? I am a little concerned this file might need to be updated as we upgrade musl. Waldek -- You received this message because you are subscribed to the Google Groups "OSv Development"

[osv-dev] syscall() call in libc/network/if_nameindex.c

2020-08-10 Thread Waldek Kozaczuk
Any reason why we use __syscall(SYS_close, ...) vs close()? struct if_nameindex *if_nameindex() { size_t n; void *p = 0; int s = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, 0); if (s>=0) { for (n=0; (p=do_nameindex(s, n)) == (void *)-1; n++); __syscall(SYS_close, s); } errno = ENOBUFS; return p; }