Building products distributor BlueLinx improved its net loss to $3.7 million in the second quarter, up from $9.8 million a year ago, the company announced Thursday. Price increases for specialty and structural products pushed revenues up 3.2% to $517 million for the same period.

The growth in revenues also highlights a shifting product mix. Of the $517 million posted for the second quarter, $215.7 million, or 41%, came from structural products and $307.9 million, or 59%, came from specialty wares. A year ago, 38% of sales came from structural products and 62% came from specialty.

The Atlanta-based building products distributor’s $3.86 million operating gain is an improvement over last year’s $1.75 million operating loss and represents the company’s first quarterly operating gain since the second quarter of 2010, BlueLinx president and CEO George Judd said in a statement.

Operating expenses remained flat at $59 million in the second quarter from a year ago, while margins nudged upward to 12.1% from 11.7% a year ago. The company noted that of its $517 million in second-quarter revenues, $215.7 million cane from structural products, while