[OpenIndiana-discuss] libfm build error, pwd.h related
Kostya Berger
bergerkos at yahoo.co.uk
Thu Jun 26 19:11:45 UTC 2025
As a matter of fact, it was -D_POSIX_C_SOURCE=200112L thatdid the trick. Per getpwnam manpage
So thank you again.
Yahoo Mail: Search, Organize, Conquer
On Thu, Jun 26, 2025 at 18:09, Kostya Berger via openindiana-discuss<openindiana-discuss at openindiana.org> wrote: oh thank you. I was thinking that the macro _REDEFINE_EXTNAME had to be added as a compiler flag... Or will it be used automatically?
Yahoo Mail: Search, Organize, Conquer
On Thu, Jun 26, 2025 at 17:55, Bill Sommerfeld via openindiana-discuss<openindiana-discuss at openindiana.org> wrote: 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
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
More information about the openindiana-discuss
mailing list