From c18d926174e521fd32d9646b72da169a08d02437 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 14 Feb 2024 03:36:18 +0200 Subject: [PATCH] LibC: Fix timeval field name --- libc/include/bits/types/timeval.h | 2 +- libc/sys/select.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/include/bits/types/timeval.h b/libc/include/bits/types/timeval.h index 04d0083ff..a54b145be 100644 --- a/libc/include/bits/types/timeval.h +++ b/libc/include/bits/types/timeval.h @@ -12,7 +12,7 @@ __BEGIN_DECLS struct timeval { time_t tv_sec; /* Seconds. */ - suseconds_t tc_usec; /* Microseconds. */ + suseconds_t tv_usec; /* Microseconds. */ }; __END_DECLS diff --git a/libc/sys/select.cpp b/libc/sys/select.cpp index 52333086c..f2cfea783 100644 --- a/libc/sys/select.cpp +++ b/libc/sys/select.cpp @@ -22,7 +22,7 @@ int select(int nfds, fd_set* __restrict readfds, fd_set* __restrict writefds, fd if (timeout) { ts.tv_sec = timeout->tv_sec; - ts.tv_nsec = timeout->tc_usec * 1000; + ts.tv_nsec = timeout->tv_usec * 1000; pts = &ts; }