$NetBSD: patch-ag,v 1.1 2008/11/23 21:21:43 hasso Exp $ --- src/polkit/polkit-config.c.orig 2008-11-23 22:37:33 +0200 +++ src/polkit/polkit-config.c 2008-11-23 22:44:41 +0200 @@ -556,6 +556,7 @@ config_node_match (ConfigNode *node, str1 = kit_strdup_printf ("%d", uid); { +#ifndef __DragonFly__ struct passwd pd; struct passwd* pwdptr=&pd; struct passwd* tempPwdPtr; @@ -565,6 +566,13 @@ config_node_match (ConfigNode *node, if ((getpwuid_r (uid, pwdptr, pwdbuffer, pwdlinelen, &tempPwdPtr)) !=0 ) goto out; str2 = kit_strdup (pd.pw_name); +#else + struct passwd *pd; + + pd = getpwuid (uid); + if (pd != NULL) + str2 = kit_strdup (pd->pw_name); +#endif } break; }