Studying the behaviour of hydrogen in the vicinity of extended defects, such as grain boundaries, dislocations, nanovoids and phase boundaries, is critical in understanding the phenomenon of hydrogen embrittlement. A key complication in this context is the interplay between hydrogen and other segregating elements. Modelling the competition of H with other light elements requires an efficient description of the interactions of compositionally complex systems, with the system sizes needed to appropriately describe extended defects often precluding the use of direct ab initio approaches. In this regard, we have developed novel electronic structure approaches to understand the energetics and mutual interactions of light elements at representative structural features in high-strength ferritic steels. Using this approach, we examine the cosegregation of hydrogen with carbon at chosen grain boundaries in α-iron. A key finding of this preliminary work is that the strain introduced by segregated carbon atoms at tilt grain boundaries increases the solubility of hydrogen close to the boundary plane, giving a higher H concentration in the vicinity of the boundary than in a carbon-free case.