diff --git a/autobuild.xml b/autobuild.xml
index bcf4ada6ef..373f4f0672 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2943,26 +2943,14 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
name
darwin64
- linux
-
linux64
archive
hash
- addb209bb56a8f16602a7222f119191d
+ b7be1d6116fb5848ab2beef19b6a8b15
url
- http://3p.firestormviewer.org/openjpeg-1.5.1.180991822-linux64-180991822.tar.bz2
+ http://3p.firestormviewer.org/openjpeg-2.3.1.202991551-linux64-202991551.tar.bz2
name
linux64
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake
index e2f9c58353..cee640c154 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -9,11 +9,11 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
- if(WINDOWS)
- set(OPENJPEG_LIBRARIES openjp2)
- else(WINDOWS)
+ if(DARWIN)
set(OPENJPEG_LIBRARIES openjpeg)
- endif(WINDOWS)
+ else(DARWIN)
+ set(OPENJPEG_LIBRARIES openjp2)
+ endif(DARWIN)
set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg)
endif (USESYSTEMLIBS)
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index 650234a4bf..162afdc201 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -29,7 +29,7 @@
// this is defined so that we get static linking.
#include "openjpeg.h"
-#ifdef LL_WINDOWS
+#ifndef LL_DARWIN
#include "cio.h"
#include "event.h"
#define OPENJPEG2