Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: When the Prophet of Allah (peace and blessings be upon him) set out from Madinah to conquer Makkah, it was the month of Ramadan and he (peace and blessings be upon him) was fasting. He (peace and blessings be upon him) kept fasting until he reached Qudayd, where news reached him (peace and blessings be upon him) that the people were suffering from thirst and hardship. So he (peace and blessings be upon him) called for water, drank it and broke his fast. After that, whoever wished fasted and whoever wished broke the fast.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11277