Patients with the X-linked form or CD40 mutations are given prophylactic trimethoprim / sulfamethoxazole to prevent P jirovecii infection, and environmental precautions are taken to reduce the risk of Cryptosporidium infection (see Gastroenteritis: prevention).