Value investors are a very patient sort by nature, and the great ones are not prone to second-guessing their purchases. Instead, frugal gurus such as Warren Buffett bide their time and calmly wait for the market to come around and realize the potential that they always knew was there. In markets as turbulent as these, however, even the great investors can end up waiting far longer then they might have imagined to realize their gains.

When Buffett purchased 3.5 million shares of building-materials manufacturer USG (NYSE:USG) back in 2006 for an estimated average price in the mid $40s, talk of a housing downturn that has since devastated shares of homebuilders such as Pulte Homes (NYSE:PHM) and D.R. Horton (NYSE:DHI) was more like a tiny whisper.

The housing slump and rising input costs have put the brakes on earnings for USG, the global king of gypsum wallboard. After posting $56 million in profits for the second quarter of 2007, USG lost $40 million for the recently completed quarter. The loss included $21 million in charges relating to restructuring, including job cuts and the closure of distribution centers and manufacturing lines.

Not all of the news was bad, though. Through the restructuring, the company has achieved greater operating efficiencies by closing some older, higher-cost manufacturing lines. Despite weak demand, the company managed to raise product prices to absorb some cost increases. USG also announced a 65% increase in operating profit from the worldwide ceilings division, on sales of $237 million.

The Motley Fool is fortunate to have a value guru of its own. When first recommending USG for Inside Value in January 2007, Philip Durell pointed out that "USG has a distinct moat, bestowed by an industry with few players and a fully integrated supply chain, controlling quality and costs all the way from mine to customer."

There is no question that this protracted downturn in the housing market represents a high-stakes game of survival of the fittest for companies exposed to the housing market. For companies with economic moats -- including USG, Vulcan Materials (NYSE:VMC), and Cemex (NYSE:CX) -- healthy survival prospects could translate into deep long-term value.

Further Foolishness:

USG is a Motley Fool Inside Value recommendation, and Cemex is a selection of both Motley Fool Global Gains and Motley Fool Stock Advisor. Try any of our Foolish newsletter services free for 30 days.

Fool contributor Christopher Barker captains yachts and writes about stocks. You can also find him blogging actively and acting Foolishly within the CAPS community under the username TMFSinchiruna. He owns no shares in the companies mentioned. The Fool owns shares of Cemex. Its disclosure policy is written in the cement.