this fixes some compilation issues with libosmocore under NuttX,
particularly as some #defines are missing or some header files are
slightly different.
There doesn't seem to be a way to share this code with Linux as
it doesn't have the sockaddr_dl concept inside the getifaddrs.
I manually verified this on a FreeBSD10 box and hex decoding gave
me the correct mac address and rc was 0.