   }
 #else
   import Darwin
+  
+  public typealias sa_family_t = Darwin.sa_family_t
+  
+  // using an exact alias gives issues with sizeof()
+  public typealias xsys_sockaddr     = Darwin.sockaddr
+  public typealias xsys_sockaddr_in  = Darwin.sockaddr_in
+  public typealias xsys_sockaddr_in6 = Darwin.sockaddr_in6
+  public typealias xsys_sockaddr_un  = Darwin.sockaddr_un
+  
+  public typealias addrinfo     = Darwin.addrinfo
+  public typealias socklen_t    = Darwin.socklen_t
   
   public struct xsys {
     // dylib

#if os(Linux)
  import Glibc

  public struct xsys {
    // dylib
    public static let dlsym  = Glibc.dlsym

    public static let SOCK_DGRAM  = Darwin.SOCK_DGRAM
    public static let SHUT_RD     = Darwin.SHUT_RD
    
    public static let AF_UNSPEC   = Darwin.AF_UNSPEC
    public static let AF_INET     = Darwin.AF_INET
    public static let AF_INET6    = Darwin.AF_INET6
    public static let AF_LOCAL    = Darwin.AF_LOCAL
    public static let PF_UNSPEC   = Darwin.PF_UNSPEC
    
    // POSIXError
    public static var errno : Int32 { return Darwin.errno }
    
