summaryrefslogtreecommitdiffstats
path: root/server/display-channel.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/display-channel.h')
-rw-r--r--server/display-channel.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/display-channel.h b/server/display-channel.h
index 1403b33f..c3dcc29d 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -75,7 +75,14 @@ typedef struct DisplayChannel DisplayChannel;
#define RED_COMPRESS_BUF_SIZE (1024 * 64)
typedef struct RedCompressBuf RedCompressBuf;
struct RedCompressBuf {
- uint32_t buf[RED_COMPRESS_BUF_SIZE / 4];
+ /* This buffer provide space for compression algorithms.
+ * Some algorithms access the buffer as an array of 32 bit words
+ * so is defined to make sure is always aligned that way.
+ */
+ union {
+ uint8_t bytes[RED_COMPRESS_BUF_SIZE];
+ uint32_t words[RED_COMPRESS_BUF_SIZE / 4];
+ } buf;
RedCompressBuf *next;
RedCompressBuf *send_next;
};