1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 20:05:07 +00:00

Import very modest Userland.

This commit is contained in:
Andreas Kling 2018-10-22 14:06:22 +02:00
parent 4cbf079a17
commit 63764b3a65
23 changed files with 81 additions and 27 deletions

View file

@ -13,7 +13,7 @@ FileHandle::~FileHandle()
{
}
#ifndef SERENITY_KERNEL
#ifndef SERENITY
bool additionWouldOverflow(Unix::off_t a, Unix::off_t b)
{
ASSERT(a > 0);
@ -69,7 +69,7 @@ Unix::off_t FileHandle::seek(Unix::off_t offset, int whence)
break;
case SEEK_CUR:
newOffset = m_currentOffset + offset;
#ifndef SERENITY_KERNEL
#ifndef SERENITY
if (additionWouldOverflow(m_currentOffset, offset))
return -EOVERFLOW;
#endif