Mammals. I am no scientist, but I think that they are closer to mammals due to the fact that they are warm-blooded, and they raise their young. Reptiles are cold blooded and usually leave their offspring to fend for themselves.
birds aren't just closely related to dinosaurs, they are really are dinosaurs this is what most people mean when they say that birds are reptiles, although technically according to the phylogenetic system mammals are also reptiles.