Fix breakage after r211259

While we are here introduce the proper headers for the error code.

Reviewed-by: Tom Stellard <tom@stellard.net>