Pointer truncation/expansion needs to be very explicit
diff --git a/unix/vncconfig/vncExt.c b/unix/vncconfig/vncExt.c
index f4ade8c..eef7c4b 100644
--- a/unix/vncconfig/vncExt.c
+++ b/unix/vncconfig/vncExt.c
@@ -16,6 +16,7 @@
  * USA.
  */
 #include <stdio.h>
+#include <stdint.h>
 
 #define NEED_REPLIES
 #include <X11/Xlib.h>
@@ -336,7 +337,7 @@
   _XReadPad(dpy, *user, rep.userLen);
   (*user)[rep.userLen] = 0;
   *timeout = rep.timeout;
-  *opaqueId = (void*)rep.opaqueId;
+  *opaqueId = (void*)(intptr_t)rep.opaqueId;
   return True;
 }
 
@@ -351,7 +352,7 @@
   req->reqType = codes->major_opcode;
   req->vncExtReqType = X_VncExtApproveConnect;
   req->approve = approve;
-  req->opaqueId = (CARD32)opaqueId;
+  req->opaqueId = (CARD32)(intptr_t)opaqueId;
   UnlockDisplay(dpy);
   SyncHandle();
   return True;