AB2C4 defect semiconductors can be thought of as generalized zincblende compounds, in which the presence of two different cations and of vacant sites favours the formation of several crystalline phases. In this work we present a theoretical study of the structural stability of the ZnxCdl-xIn2S4 solid solutions. The end compounds crystallize in a layer (x = 1) and in a spinel structure (x = 0). Total energy first principle calculations have been performed for both phases and for various values of x. The theoretical structural stability diagram compares very well with experiment.