Skip to content

ENT-13146: Fixed compilation error on Solaris 11 #5847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

larsewi
Copy link
Contributor

@larsewi larsewi commented Jul 31, 2025

02:18:08 evalfunction.c:1452:11: error: too many arguments to function ‘getgrnam_r’
02:18:08      ret = getgrnam_r(group_name, &grp, gr_buf, GETGR_R_SIZE_MAX, &grent);
02:18:08            ^

Prior to Oracle Solaris 11.4, the default compilation environment
provided definitions of the getgrnam_r() and getgrgid_r() functions as
specified in POSIX.1c Draft 6. The final POSIX.1c standard changed the
interfaces for getgrnam_r() and getgrgid_r().

One of the implementations seem to be defined in pwd.h and the other in
grp.h. Hence, we need to make sure to include the correct one first.

Ticket: ENT-13146
Signed-off-by: Lars Erik Wik [email protected]

Build on Solaris
Build Status

```
02:18:08 evalfunction.c:1452:11: error: too many arguments to function ‘getgrnam_r’
02:18:08      ret = getgrnam_r(group_name, &grp, gr_buf, GETGR_R_SIZE_MAX, &grent);
02:18:08            ^
```

Prior to Oracle Solaris 11.4, the default compilation environment
provided definitions of the getgrnam_r() and getgrgid_r() functions as
specified in POSIX.1c Draft 6. The final POSIX.1c standard changed the
interfaces for getgrnam_r() and getgrgid_r().

One of the implementations seem to be defined in pwd.h and the other in
grp.h. Hence, we need to make sure to include the correct one first.

Ticket: ENT-13146
Signed-off-by: Lars Erik Wik <[email protected]>
@larsewi larsewi closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant