diff options
| author | 2023-05-13 20:23:19 +0200 | |
|---|---|---|
| committer | 2023-05-13 20:23:19 +0200 | |
| commit | ff0010080bbab16ec7b12b7f71e958d1e4f6f94b (patch) | |
| tree | 2e5a2781651907bc2a4932dfd2a2f8d74a66d8c6 | |
| parent | af51970e6b1b9d9e6c8a925b040420e465bc2326 (diff) | |
| download | libplist-ff0010080bbab16ec7b12b7f71e958d1e4f6f94b.tar.gz libplist-ff0010080bbab16ec7b12b7f71e958d1e4f6f94b.tar.bz2 | |
Windows: Use winsock2.h instead of sys/time.h when using MSVC
| -rw-r--r-- | include/plist/Date.h | 4 | ||||
| -rw-r--r-- | src/plist.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/plist/Date.h b/include/plist/Date.h index 3cfb7d1..5113cf3 100644 --- a/include/plist/Date.h +++ b/include/plist/Date.h | |||
| @@ -24,7 +24,11 @@ | |||
| 24 | 24 | ||
| 25 | #include <plist/Node.h> | 25 | #include <plist/Node.h> |
| 26 | #include <ctime> | 26 | #include <ctime> |
| 27 | #ifdef _MSC_VER | ||
| 28 | #include <winsock2.h> | ||
| 29 | #else | ||
| 27 | #include <sys/time.h> | 30 | #include <sys/time.h> |
| 31 | #endif | ||
| 28 | 32 | ||
| 29 | namespace PList | 33 | namespace PList |
| 30 | { | 34 | { |
diff --git a/src/plist.h b/src/plist.h index 4351ce4..178fb7c 100644 --- a/src/plist.h +++ b/src/plist.h | |||
| @@ -30,11 +30,13 @@ | |||
| 30 | 30 | ||
| 31 | #include <sys/types.h> | 31 | #include <sys/types.h> |
| 32 | #include <sys/stat.h> | 32 | #include <sys/stat.h> |
| 33 | #include <sys/time.h> | ||
| 34 | 33 | ||
| 35 | #ifdef _MSC_VER | 34 | #ifdef _MSC_VER |
| 36 | #pragma warning(disable:4996) | 35 | #pragma warning(disable:4996) |
| 37 | #pragma warning(disable:4244) | 36 | #pragma warning(disable:4244) |
| 37 | #include <winsock2.h> | ||
| 38 | #else | ||
| 39 | #include <sys/time.h> | ||
| 38 | #endif | 40 | #endif |
| 39 | 41 | ||
| 40 | struct plist_data_s | 42 | struct plist_data_s |
