The correct answer is had been waiting.
The sentence uses past perfect continuous to describe that the waiting had already started before he said it and continued until that point.