Nonextensive thermodynamics is criticized by the statement that the zeroth law cannot be satisfied with nonadditive composition rules [corrected]. In this paper we determine the general functional form of those nonadditive composition rules that are compatible with the zeroth law of thermodynamics. We find that this general form is additive for the formal logarithms of the original quantities and the familiar relations of thermodynamics apply to these. Our result offers a possible solution to the long-standing questions about equilibrium between extensive and nonextensive systems or systems with different nonextensivity parameters.