From 65a0282b9c377013cdcf90d39ebab9f8d621d899 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 18 May 2021 18:56:49 +0100 Subject: [PATCH] Fix buftest to build on Windows Signed-off-by: David Woodhouse --- tests/buftest.c | 8 ++++++-- textbuf.c | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/buftest.c b/tests/buftest.c index b3148ad8..98ecbc97 100644 --- a/tests/buftest.c +++ b/tests/buftest.c @@ -19,7 +19,11 @@ #include #include +#ifdef _WIN32 +#include +#else #include +#endif #define __OPENCONNECT_INTERNAL_H__ @@ -74,14 +78,14 @@ static inline uint16_t load_le16(const void *_p) return p[0] | (p[1] << 8); } -static inline void store_le32(void *_p, uint32_t d) +static inline void store_le16(void *_p, uint32_t d) { unsigned char *p = _p; p[0] = d; p[1] = d >> 8; } -static inline void store_le16(void *_p, uint16_t d) +static inline void store_le32(void *_p, uint16_t d) { unsigned char *p = _p; p[0] = d; diff --git a/textbuf.c b/textbuf.c index ed9e2e8c..62f279d2 100644 --- a/textbuf.c +++ b/textbuf.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "openconnect-internal.h" -- 2.49.0