Recently a patch was added to the osl libraries by a blender developer that allows a render engine to specify the alignment used in closure data storage. This patch addressed some stability issues we had and has been added to the osl 1.5.x libraries used to build the recent release of blender.
This patch will only be officially included in osl 1.6.x and will not be added to the osl 1.5.x releases. See comment by Larry Gritz on this commit.
Currently blender only compiles against osl libs containing this patch. My attached patch allows blender to compile against older 1.5.x osl libs that don't include this patch. It is assumed that osl libs from 1.5.11 will unofficially include this patch to be used with blender.
Related to this is the fact that blender currently does not compile with osl 1.4.x libs. With osl 1.6 being considered for release fairly soon, I pose the question of whether we want to include support for osl less than 1.6.0? and is there any need to fix compiling against osl 1.4.x?
If only osl 1.6 is to be supported from the next blender released after osl 1.6, then osl version conditionals could start to be removed and this patch can be discarded. If we don't want to support blender being compiled without the osl patch mentioned above then this can also be discarded.
As there is no technical reason preventing osl 1.6 being compiled on the same machine as blender master and the fact that osl hasn't been overly popular in blender, I vote that there will be no need to maintain support for older osl versions.