Not necessarily. It would depend entirely on the severity of the foundation problem.
If it is severe, a Professional Engineer should be hired to assess the situation and recommend a proper course of treatment. If it is like most typical foundation problems around here, one only need to hire a reputable foundation repair company to assess it and a course of action to remediate the problem.
Then, armed with cost estimates, the buyer is in a position to ask for price concessions or even having it repaired prior to closing.
The advantage of having a foundation repaired, is that most companies give a gaurantee against future problems and it is usually transferrable when the party sells the house, which is a strong selling feature
GRI, CRS, ABR, CLHMS, e-Pro