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 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 (interpretation of the meaning):
“and has not laid upon you in religion any hardship” [al-Hajj 22:78]
“Allah burdens not a person beyond his scope” [al-Baqarah 2:286]
But he should not eat or drink anything except that which Allah has permitted.