Previously this file failed to compile with the following errors:
$ gcc manual/examples/filesrv.c
manual/examples/filesrv.c: In function ‘main’:
manual/examples/filesrv.c:37:3: error: implicit declaration of function ‘unlink’ [-Wimplicit-function-declaration]
37 | unlink (SERVER);
| ^~~~~~
manual/examples/filesrv.c:40:10: error: implicit declaration of function ‘make_named_socket’ [-Wimplicit-function-declaration]
40 | sock = make_named_socket (SERVER);
| ^~~~~~~~~~~~~~~~~
manual/examples/filesrv.c:46:54: error: passing argument 6 of ‘recvfrom’ from incompatible pointer type [-Wincompatible-pointer-types]
46 | (struct sockaddr *) & name, &size);
| ^~~~~
| |
| size_t * {aka long unsigned int *}
In file included from manual/examples/filesrv.c:21:
/usr/include/sys/socket.h:165:48: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
165 | socklen_t *__restrict __addr_len);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
This patch fixes the missing declaration for unlink and uses
'socklen_t *' for the fourth argument of recv from. The
make_named_socket function is defined in the manual.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.
I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah. I don't
know why I run into these diagnostics whereas others evidently do not.
remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master