From DictionGloss
(1) the building occupied by the personnel detailed for sentinel duty; (2) the guardhouse was used also as a prison to confine garrison prisoners. In the 20th century the prison function of the guardhouse came to be called the "stockade."