Pion structure function from low-pT hadron production