Infrared photometry of O stars