diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h
index 5dce783945..06bbcf66d0 100755
--- a/indra/llkdu/llimagej2ckdu.h
+++ b/indra/llkdu/llimagej2ckdu.h
@@ -33,6 +33,13 @@
// KDU core header files
//
#define KDU_NO_THREADS
+
+// Some magic to make KDU and the viewer agree with internal alignments
+#if KDU_MAJOR_VERSION >= 7 && KDU_MINOR_VERSION >= 5
+ #define KDU_X86_INTRINSICS
+#endif
+//
+
#include "kdu_elementary.h"
#include "kdu_messaging.h"
#include "kdu_params.h"
diff --git a/indra/llkdu/llkdumem.h b/indra/llkdu/llkdumem.h
index 6977013643..b2c95acccc 100755
--- a/indra/llkdu/llkdumem.h
+++ b/indra/llkdu/llkdumem.h
@@ -38,7 +38,14 @@
//
// Support classes for reading and writing from memory buffers in KDU
-#define KDU_NO_THREADS
+#define KDU_NO_THREAD
+
+// Some magic to make KDU and the viewer agree with internal alignments
+#if KDU_MAJOR_VERSION >= 7 && KDU_MINOR_VERSION >= 5
+ #define KDU_X86_INTRINSICS
+#endif
+//
+
#include "kdu_image.h"
#include "kdu_elementary.h"
#include "kdu_messaging.h"