fix type of 'soc' so 'soc < 0' makes any sense
fix setsockopt(NONBLOCK) to pass pointer to value of option. otherwise the function dereferences the value and boom' makes any sense
use HEADERS_SIZE_EVNT rather than hardcoding 10
fix return types for calls to SimpleLinkWaitEvent() so they match what hci_event_handler() expects to write to. this fixes a stack smashing in setsockopt()