Skip to content

Commit

Permalink
AK: Don't include winsock2.h in Time.h
Browse files Browse the repository at this point in the history
  • Loading branch information
stasoid committed Nov 18, 2024
1 parent c0ae3aa commit 3109558
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions AK/Time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
#include <AK/Checked.h>
#include <AK/Time.h>

#include <time.h>
#if defined(AK_OS_WINDOWS)
# include <profileapi.h>
#else
# include <sys/time.h>
#ifdef AK_OS_WINDOWS
# define timeval dummy_timeval
# include <windows.h>
# undef timeval
#endif

namespace AK {
Expand Down
7 changes: 5 additions & 2 deletions AK/Time.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
#include <AK/Checked.h>
#include <AK/Platform.h>
#include <AK/Types.h>
#if defined(AK_OS_WINDOWS)
# include <winsock2.h>
#ifdef AK_OS_WINDOWS
struct timeval {
long tv_sec;
long tv_usec;
};
#else
# include <sys/time.h>
#endif
Expand Down

0 comments on commit 3109558

Please sign in to comment.