Files
ladybird/Userland/Libraries/LibC
Sergey Bugaev b604640950 LibC: Fix struct declaration visibility
Isn't

"expected struct timeval *, but argument is of type struct timeval *"

a fun error message? C considers a 'struct foo' mentioned inside a
function argument to be a distinct type from 'struct foo' declared on
the global level, but only if the in-function definition comes first. So
we need to ensure that struct timeval is declared (either fully, or
forward-declared) before we declare select() and pselect(). This was
taken care of by including <sys/time.h>, but
https://github.com/SerenityOS/serenity/pull/20044 made it so that
<sys/time.h> itself includes <sys/select.h>. So if the user's program
includes <sys/time.h> (before possibly including <sys/select.h>), then
<sys/select.h>'s include of <sys/time.h> will turn into a no-op (since
<sys/time.h> is already being included), yet there will not have been a
struct timeval definition yet, and we'd get the fun error message.

Fix this by including <Kernel/API/POSIX/sys/time.h> instead of
<sys/time.h>
2023-07-29 16:51:58 -06:00
..
2022-12-28 11:53:41 +01:00
2022-08-23 19:07:12 +01:00
2022-12-03 23:52:23 +00:00
2022-08-23 19:07:12 +01:00
2022-08-23 19:07:12 +01:00
2022-11-25 23:13:16 +01:00
2023-07-08 15:53:02 -04:00
2023-06-07 13:44:44 +02:00
2022-08-23 19:07:12 +01:00
2022-11-08 11:51:19 +01:00
2022-08-23 19:07:12 +01:00
2022-11-29 11:04:21 +01:00
2022-10-14 13:37:29 +02:00
2022-10-14 13:37:29 +02:00
2022-12-03 23:52:23 +00:00