Praise be to Allah.
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 Allaah has forbidden. If it is not possible to eat elsewhere then it is permissible to eat there in cases of necessity, because Allaah says (interpretation of the meaning):
“and has not laid upon you in religion any hardship”
“Allaah burdens not a person beyond his scope”
But he should not eat or drink anything except that which Allaah has permitted.