If you stop counting third-world countries all you really need to do is establish an institution that keeps track of homeless people and puts them to work doing unskilled labor in exchange for food and shelter.
If that's not an option you'll need to figure out how many people there are who can't feed themselves regularly, what resources you have at your disposal, and what solutions you can implement with those resources. The easiest thing to do is wipe out a few impoverished regions in shitty parts of Africa, India, Asia, and South America. That's a lot of dead motherfuckers you don't need to worry about.
Recalculate. With so many worthless humans who can't or won't work (or farm) out of the picture, you now have more to go around for the survivors. But you can't stop here, or the same thing will happen further down the line--now you need to implement population control. Everyone born in an area at risk of producing significant quantities of homeless people forfeits their reproductive rights until they can provide something to society. It's not hard, just prove that you can feed yourself and your kid--both parents, so the two of them gather enough resources for four people.
Keep going. If you've cleaned up the homeless/hungry problem in wealthy areas great, otherwise tackle the vices. Gambling, drug addiction, drinking, etc. Anything that could lead to homelessness and being unable to provide for yourself and others. Get a lock on it. Legislation passes that makes it punishable by incarceration (and enslavement, to work on a farm, coal mine, oil rig, whatever) if you don't meet certain standards of living. Don't outlaw drugs, though: take control of them yourself. The government now lets people apply for drug licenses, used to purchase professional grade product at low costs to use in an appropriate environment. You lose your license and are incarcerated if non-approved drugs are found in your system or you develop an untreatable addiction.