Patch with new API for get/setsockopt