aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/colormap.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-02-26 05:12:20 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-26 05:12:20 +0100
commita9787fc2e79065e8f56fdace41f4e565667c22bb (patch)
tree19559f26bed90d12689ee47145b27fcd7619820a /nx-X11/programs/Xserver/dix/colormap.c
parentb40dec982d17b010cedc183ebdc4c75ca7de785f (diff)
parent6dcfcbabe6b87467a6f811d0dc03efba7bfce8e4 (diff)
downloadnx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.tar.gz
nx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.tar.bz2
nx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.zip
Merge branch 'uli42-pr/update_dix' into 3.6.x
Attributes GH PR #646: https://github.com/ArcticaProject/nx-libs/pull/646
Diffstat (limited to 'nx-X11/programs/Xserver/dix/colormap.c')
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c
index 81b93d2de..db2b64714 100644
--- a/nx-X11/programs/Xserver/dix/colormap.c
+++ b/nx-X11/programs/Xserver/dix/colormap.c
@@ -52,6 +52,9 @@ SOFTWARE.
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
#include "misc.h"
#include "dix.h"
#include "colormapst.h"
@@ -273,6 +276,13 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap = (ColormapPtr) malloc(sizebytes);
if (!pmap)
return (BadAlloc);
+#if defined(_XSERVER64)
+ pmap->pad0 = 0;
+ pmap->pad1 = 0;
+#if (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+ pmap->pad2 = 0;
+#endif
+#endif
pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec));
sizebytes = size * sizeof(Entry);
pmap->clientPixelsRed = (Pixel **)((char *)pmap->red + sizebytes);