oc: add #ifdefs to related code

Change-Id: I09b45cefc25332582ce0c3cb8c450fd7cd4136ee
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>