virnetsocket: fix getsockopt on FreeBSD
virnetsocket: fix getsockopt on FreeBSD

aa0f099 introduced a strict error checking for getsockopt and it
revealed that getting a peer credential of a socket on FreeBSD
didn't work. Libvirtd hits the error:
  error : virNetSocketGetUNIXIdentity:1198 : Failed to get valid
  client socket identity groups

SOL_SOCKET (0xffff) was used as a level of getsockopt for
LOCAL_PEERCRED, however, it was wrong. 0 is correct as well as
Mac OS X.

So for LOCAL_PEERCRED our options are SOL_LOCAL (if defined) or
0 on Mac OS X and FreeBSD. According to the fact, the patch
simplifies the code by removing ifdef __APPLE__.

I tested the patch on FreeBSD 8.4, 9.2 and 10.0-BETA1.

Signed-off-by: Ryota Ozaki <d18bd3af6589332ccdaa02f8dcaa552d52fbdad6@gmail.com>

elmarco/libvirt,elmarco/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,datto/libvirt,shugaoye/libvirt,eskultety/libvirt,cbosdo/libvirt,taget/libvirt,agx/libvirt,zippy2/libvirt,agx/libvirt,libvirt/libvirt,VenkatDatta/libvirt,libvirt/libvirt,libvirt/libvirt,crobinso/libvirt,VenkatDatta/libvirt,elmarco/libvirt,cbosdo/libvirt,datto/libvirt,nertpinx/libvirt,olafhering/libvirt,rlaager/libvirt,eskultety/libvirt,rlaager/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,datto/libvirt,olafhering/libvirt,agx/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,fabianfreyer/libvirt,taget/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,shugaoye/libvirt,olafhering/libvirt,VenkatDatta/libvirt,datto/libvirt,taget/libvirt,cbosdo/libvirt,zippy2/libvirt,nertpinx/libvirt,rlaager/libvirt,crobinso/libvirt,jfehlig/libvirt,eskultety/libvirt,jardasgit/libvirt,jfehlig/libvirt,shugaoye/libvirt,andreabolognani/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,jardasgit/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,fabianfreyer/libvirt,olafhering/libvirt,eskultety/libvirt,taget/libvirt,jardasgit/libvirt,agx/libvirt,zippy2/libvirt,shugaoye/libvirt,libvirt/libvirt,andreabolognani/libvirt,agx/libvirt,elmarco/libvirt,elmarco/libvirt,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,jardasgit/libvirt,cbosdo/libvirt,cbosdo/libvirt,zhlcindy/libvirt-1.1.4-maintain,eskultety/libvirt,zippy2/libvirt,jfehlig/libvirt,taget/libvirt,nertpinx/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,rlaager/libvirt,crobinso/libvirt