$NetBSD: patch-kdesud,v 1.1.1.1 2009/10/02 19:30:13 markd Exp $ g++ 4.1.2 says: kdesud.cpp:210: error: cast from 'char*' to 'socklen_t' loses precision --- kdesu/kdesud/kdesud.cpp.orig 2007-10-26 01:22:09.000000000 +1300 +++ kdesu/kdesud/kdesud.cpp @@ -79,8 +79,8 @@ #endif #ifndef SUN_LEN -#define SUN_LEN(ptr) ((kde_socklen_t) (((struct sockaddr_un *) 0)->sun_path) \ - + strlen ((ptr)->sun_path)) +#define SUN_LEN(ptr) ((kde_socklen_t) \ + (offsetof(struct sockaddr_un, sun_path) + strlen ((ptr)->sun_path))) #endif #define ERR strerror(errno)