Skip to content

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

Closed
larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:solaris2
Closed

ENT-13146: Fixed compilation error on Solaris 11#5847
larsewi wants to merge 1 commit into
cfengine:masterfrom
larsewi:solaris2

Conversation

@larsewi

@larsewi larsewi commented Jul 31, 2025

Copy link
Copy Markdown
Contributor
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 lars.erik.wik@northern.tech

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 <lars.erik.wik@northern.tech>
@larsewi larsewi closed this Jul 31, 2025
@larsewi larsewi deleted the solaris2 branch October 2, 2025 14:41
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