GLENDALE, Ariz. -- Ryan Court's two-out, two-run single in the eighth inning gave the D-backs a 4-2 victory over the White Sox on Wednesday at Camelback Ranch.

Court plated the go-ahead runs following a balk by reliever Dylan Axelrod.

White Sox starter Gavin Floyd settled down after allowing one run in the first and worked five innings.

Arizona started with a long double by Willie Bloomquist and Gerardo's Parra's blast to right that Dewayne Wise hauled in on a great running catch against the wall. Martin Prado followed with a run-scoring single to center, and Jason Kubel lined out to Jordan Danks in center.

Aside from A.J. Pollock's solo homer leading off the second, Floyd went relatively unscathed over the next four innings. He yielded seven hits overall, walking one and fanning five.

Brandon McCarthy got the start against his former team, marking his second 2013 Cactus League appearance against the White Sox. The White Sox scored both off their runs off the right-hander in the third on Jordan Danks' leadoff homer and Alexei Ramirez's ground out following Gordon Beckham's double and Wise's flyout to right.

McCarthy yielded 10 hits over six innings, but the White Sox were only able to score twice. He struck out three and walked one.

Up next: The D-backs return to Salt River Fields on Thursday to take on the Indians at 1:10 p.m. MST. Ian Kennedy will start for the D-backs and Brad Ziegler and closer J.J. Putz are also slated to see action. Kennedy was struck just below his left knee with a line drive in his last outing against the Padres, but it has not limited his between-starts work and he should be ready to go Thursday.