SDL: testevdev: Add a static assertion for supported sizeof(long)

From 81dee3194990351148c6e2ccd9bb3b4a7bed3079 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 12 Oct 2022 12:36:41 +0100
Subject: [PATCH] testevdev: Add a static assertion for supported sizeof(long)

If this assertion fails on some platform (unlikely), we will need a
third implementation for SwapLongLE().

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 test/testevdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/testevdev.c b/test/testevdev.c
index fe9e367eead7..2ac7ad5b31d8 100644
--- a/test/testevdev.c
+++ b/test/testevdev.c
@@ -935,6 +935,7 @@ static const GuessTest guess_tests[] =
     }
 };
 
+SDL_COMPILE_TIME_ASSERT(sizeof_long, sizeof(unsigned long) == 4 || sizeof(unsigned long) == 8);
 #define SwapLongLE(X) \
 	((sizeof(unsigned long) == 4) ? SDL_SwapLE32(X) : SDL_SwapLE64(X))