Johnny Cueto has agreed to a Minor League deal with the Chicago White Sox.

The contract is worth up to $4.2 million, prorated for time spent in the Major Leagues, according to a source.

Cueto, 36, started 21 games for the San Francisco Giants last season and went 7-7 with a 4.08 ERA.

Chicago recently lost starter Lance Lynn for more than a month due to a knee injury.