Code changes from latest OpenSolaris added (conditional)