[OpenIndiana-discuss] libfm build error, pwd.h related
Bill Sommerfeld
sommerfeld at hamachi.org
Thu Jun 26 14:55:32 UTC 2025
On 6/26/25 05:27, Kostya Berger via openindiana-discuss wrote:
> Hello!Trying to build libfm (for pcmanfm file manager). The build error seems to be related to #pragma redefine_extname stuff in /usr/include/pwd.h?
> Because the error message is:wrong number of arguments for getpwuid_r() and getgrgid_r():======================
> gmake[4]: Entering directory '/export/home/kostya/A/libfm-1.3.2/src' CC base/libfm_la-fm-file-info.lobase/fm-file-info.c: In function 'fm_file_info_get_disp_owner':base/fm-file-info.c:1817:9: error: too many arguments to function 'getpwuid_r' 1817 | getpwuid_r(fi->uid, &pwb, unamebuf, sizeof(unamebuf), &pw); | ^~~~~~~~~~In file included from base/fm-file-info.c:45:/usr/include/pwd.h:166:23: note: declared here 166 | extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int); | ^~~~~~~~~~base/fm-file-info.c: In function 'fm_file_info_get_disp_group':base/fm-file-info.c:1848:9: error: too many arguments to function 'getgrgid_r' 1848 | getgrgid_r(fi->gid, &grpb, unamebuf, sizeof(unamebuf), &grp); | ^~~~~~~~~~In file included from base/fm-file-info.c:44:/usr/include/grp.h:148:22: note: declared here 148 | extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
See the getpwnam(3c) and getgrnam(3c) manpages; you probably need to
build this software with the -D_POSIX_PTHREAD_SEMANTICS as an additional
compiler flag.
- Bill
More information about the openindiana-discuss
mailing list