Sun really needed to FOSS license Solaris before Linux hit critical mass. That would have been amazing. Linux is pretty good for what it is, but imagine if it had been Solaris that won instead of Linux, and thus running on most of the servers of the world and potentially iOS and Android as well. It might have even made some desktop inroads, given it would have launched out of the FOSS gate with a more developed desktop than Linux at the time. Such a huge missed opportunity.
I doubt Apple or NeXT would have ported their platform to Solaris (from BSD/Mach). it seems to me that BSD would have been Linux if Linux hadn't happened.