Fix HAL compilation