Skip to content

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

Merged
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:solaris
Aug 1, 2025
Merged

ENT-13146: Fixed compilation error on Solaris 11#5846
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:solaris

Conversation

@larsewi

@larsewi larsewi commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Build on Solaris
Build Status

@cf-bottom

Copy link
Copy Markdown

Thank you for submitting a PR! Maybe @craigcomstock can review this?

@larsewi larsewi changed the title Fixed compilation error for useringroup() on Solaris Fixed compilation error on Solaris 11 Jul 31, 2025
@larsewi larsewi changed the title Fixed compilation error on Solaris 11 ENT-13146: Fixed compilation error on Solaris 11 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().

While compiling evalfunction.c the copiler picks up the wrong
definition. By defining the _POSIX_PTHREAD_SEMANTICS macro, we make sure
it picks up the correct one.

Ticket: ENT-13146
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi marked this pull request as ready for review July 31, 2025 15:49
@larsewi larsewi merged commit 8d9d357 into cfengine:master Aug 1, 2025
13 of 15 checks passed
@larsewi larsewi deleted the solaris 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.

3 participants