socket: fix ifdef