Everywhere: Remove string.h include from AK/Traits.h and resolve fallout

A lot of places were relying on AK/Traits.h to give it strnlen, memcmp,
memcpy and other related declarations.

In the quest to remove inclusion of LibC headers from Kernel files, deal
with all the fallout of this included-everywhere header including less
things.
This commit is contained in:
Andrew Kaster 2023-01-07 13:57:33 -07:00 committed by Andrew Kaster
parent 0420736143
commit 7ab37ee22c
Notes: sideshowbarker 2024-07-17 01:25:15 +09:00
14 changed files with 35 additions and 18 deletions

View file

@ -992,11 +992,11 @@ ErrorOr<void> Ext2FSInode::update_timestamps(Optional<Time> atime, Optional<Time
MutexLocker locker(m_inode_lock);
if (fs().is_readonly())
return EROFS;
if (atime.value_or({}).to_timespec().tv_sec > INT32_MAX)
if (atime.value_or({}).to_timespec().tv_sec > NumericLimits<i32>::max())
return EINVAL;
if (ctime.value_or({}).to_timespec().tv_sec > INT32_MAX)
if (ctime.value_or({}).to_timespec().tv_sec > NumericLimits<i32>::max())
return EINVAL;
if (mtime.value_or({}).to_timespec().tv_sec > INT32_MAX)
if (mtime.value_or({}).to_timespec().tv_sec > NumericLimits<i32>::max())
return EINVAL;
if (atime.has_value())
m_raw_inode.i_atime = atime.value().to_timespec().tv_sec;