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 final week in Arizona for the White Sox begins Thursday with a visit from the Brewers for a 3:05 p.m. CT first pitch, which also will be part of the whitesox.com webcast series. Chris Sale, the team's Opening Day starter, will take the mound after allowing five earned runs over five-plus innings in his previous start.