With the passing of gay "marriage" in NY I've been thinking of SF that I've read over the years.
In The Moon Is a Harsh Mistress, a Heinlein "juvenile" there is such a shortage of men that polyandry is the rule as well as "line marriages", a few wives plus multiple husbands spanning generations. At the same time one on the characters makes her living as a host mother.
I Haldeman's The Forever War soldiers are sent out and return to Earth every 100 yrs or so (due to relativity) which gives a snapshot of what's going on. At one point the gov't encourage, practically mandates homosexuality as a means to get a handle on overpopulation.
India, China &c already have shortages of girls being born and I doubt even if a totalitarian state could turn around long-standing cultural biases. Still . . .
SF authors generally extrapolate (and get things terribly wrong due to that) but looking forward from where we are now doesn't look good.