test_client.c: error: static declaration of 'yield' follows non-static declaration on Solaris
Solaris 11.4 and OpenIndiana define yield(2)
in unistd.h
. Defining function of the same name in test_client.c
fails with:
test_client.c:329:1: error: static declaration of 'yield' follows non-static declaration
329 | yield(void) {
| ^~~~~
In file included from test_client.c:24:
/usr/include/unistd.h:563:13: note: previous declaration of 'yield' was here
563 | extern void yield(void);
| ^~~~~
/usr/include/unistd.h
:
#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
extern void yield(void);
#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */