winbind_nss_freebsd: fix const discard warning
[samba.git] / nsswitch / winbind_nss_freebsd.c
index 476349ffbc0d5d6e6f6a96297b79eac68945b630..e283872d0d81fcf22582d7d0bd5b0401334671e7 100644 (file)
@@ -129,8 +129,13 @@ __freebsd_getgroupmembership(void *retval, void *mdata, va_list ap)
        /* insert primary membership(possibly already there) */
        gr_addgid(group, groups, maxgrp, groupc);
        /* Don't limit number of groups, we want to know total size */
-       ret = _nss_winbind_initgroups_dyn(uname, group, &lcount, &lsize,
-               &tmpgroups, 0, &errnop);
+       ret = _nss_winbind_initgroups_dyn(discard_const(uname),
+                                         group,
+                                         &lcount,
+                                         &lsize,
+                                         &tmpgroups,
+                                         0,
+                                         &errnop);
        if (ret == NSS_STATUS_SUCCESS) {
                /* lcount potentially can be bigger than maxgrp, so would groupc */
                for (i = 0; i < lcount; i++)