$NetBSD: patch-kdesud,v 1.1 2007/03/08 14:38:31 rillig Exp $ g++ 4.1.2 says: kdesud.cpp:210: error: cast from 'char*' to 'socklen_t' loses precision --- kdesu/kdesud/kdesud.cpp.orig 2005-09-10 10:26:13.000000000 +0200 +++ kdesu/kdesud/kdesud.cpp 2007-03-08 15:18:25.000000000 +0100 @@ -77,8 +77,8 @@ #include #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)