diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index 75c993c1864..f81fc403ba6 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -282,7 +282,11 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output stdosl_path = path_get("shader/stdosl.h"); /* compile */ +#if OSL_LIBRARY_VERSION_CODE >= 10602 OSL::OSLCompiler *compiler = new OSL::OSLCompiler(&OSL::ErrorHandler::default_handler()); +#else + OSL::OSLCompiler *compiler = new OSL::OSLCompiler(); +#endif bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path)); delete compiler;