diff --git a/AK/Time.cpp b/AK/Time.cpp index 923f6404da6a2..093fd5e10373f 100644 --- a/AK/Time.cpp +++ b/AK/Time.cpp @@ -8,9 +8,7 @@ #include #ifdef AK_OS_WINDOWS -# define timeval dummy_timeval -# include -# undef timeval +# include #endif namespace AK { diff --git a/AK/windows.h b/AK/windows.h new file mode 100644 index 0000000000000..0b44e6df3bee7 --- /dev/null +++ b/AK/windows.h @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2024, stasoid + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#ifdef AK_OS_WINDOWS // needed for Swift +# define timeval dummy_timeval +# include +# undef timeval +#endif