shithub: ft²

Download patch

ref: 4dbde94aaa9d94f285aedc327a02cb12f422b791
parent: 14013d2165f62675cf9de255ff734b509ff03325
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Fri Jul 23 21:55:21 EDT 2021

pack pal16_t (otherwise crashes on Plan 9)

--- a/src/ft2_palette.h
+++ b/src/ft2_palette.h
@@ -44,10 +44,21 @@
 	PAL_NUM
 };
 
+#ifdef _MSC_VER
+#pragma pack(push)
+#pragma pack(1)
+#endif
 typedef struct pal16_t
 {
 	uint8_t r, g, b;
-} pal16;
+}
+#ifdef __GNUC__
+__attribute__ ((packed))
+#endif
+pal16;
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
 
 void setCustomPalColor(uint32_t color);