Colds and birth?

I have been wondering about this so what do they do when you give birth and have a cold/flu? Wouldn't the baby be at risk for getting sick?