A case of any port in the/a storm
When you have no choice, any port in a storm refers to a solution you accept, which in normal circumstances you would find unacceptable.
"The hotel was substandard, but it was a case of any port in a storm; all the others were full."
Accept whatever is available without knowing what it will be like.
"We were so hungry we decided to take pot luck and stopped at the first restaurant we saw."
Making the best of a bad situation
To do as well as possible under conditions that are not satisfactory
"The only way to survive being jailed is to make the best of a bad situation."