aboutsummaryrefslogtreecommitdiffstats
path: root/api/wintun.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2021-12-03 09:17:19 +0100
committerSimon Rozman <simon@rozman.si>2021-12-03 09:17:19 +0100
commitc2315570e08f52149c6c3878311aea661b9193ca (patch)
tree10997eccbf56bec84fd161574ba664492b703d92 /api/wintun.h
parentproj: stop building for arm32 (diff)
downloadwintun-c2315570e08f52149c6c3878311aea661b9193ca.tar.xz
wintun-c2315570e08f52149c6c3878311aea661b9193ca.zip
api: header: silence MSVC warnings for MSVC only
MinGW ignores unknown `#pragma warning` lines, but displays a warning nevertheless. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to '')
-rw-r--r--api/wintun.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/api/wintun.h b/api/wintun.h
index 6b7e0da..bcf5ccc 100644
--- a/api/wintun.h
+++ b/api/wintun.h
@@ -30,8 +30,10 @@ extern "C" {
# define _Post_maybenull_
#endif
-#pragma warning(push)
-#pragma warning(disable : 4324) /* structure was padded due to alignment specifier */
+#if defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning(disable : 4324) /* structure was padded due to alignment specifier */
+#endif
/**
* A handle representing Wintun adapter
@@ -263,7 +265,9 @@ BYTE *(WINAPI WINTUN_ALLOCATE_SEND_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Sessi
*/
typedef VOID(WINAPI WINTUN_SEND_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Session, _In_ const BYTE *Packet);
-#pragma warning(pop)
+#if defined(_MSC_VER)
+# pragma warning(pop)
+#endif
#ifdef __cplusplus
}