OK, there is a provision for survivor's benefits for spouses who are caring for minor children of the decedent. But the scenario you described, a man who is dying of HIV marries a young man, doesn't seem conducive to minor children being in the picture.
It's certainly possible for men to adopt children, even gay men, but I would imagine that cases in which one man was staying home to care for minor children while getting the other man's Social Security benefits are few and far between.
It's far more likely that a man with AIDS would marry another man in order to get health care benefits.
I saw that provision, but thats not what I was talking about. I thought the 10 year rule was in regards to how long the dying man had to work before his spouse (no mention of how long they had to be married) got survivor benefits.