If it is possible to eat elsewhere then it is not permissible to eat at these places, because that involves cooperating with them in sin and transgression, which Allah has forbidden. If it is not possible to eat elsewhere then it is permissible to eat there in cases of necessity, because Allah says in Quran:
“and has not laid upon you in religion any hardship”
“Allah burdens not a person beyond his scope”
But he should not eat or drink anything except that which Allah has permitted.