From 9c34b51a96f6f2c166d2340a9440180a847ea87d Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Thu, 31 Jul 2025 11:32:22 +0200 Subject: [PATCH] Fixed compilation error on Solaris 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` 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 --- libpromises/evalfunction.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpromises/evalfunction.c b/libpromises/evalfunction.c index 6c44694363..c15d6104ae 100644 --- a/libpromises/evalfunction.c +++ b/libpromises/evalfunction.c @@ -22,6 +22,10 @@ included file COSL.txt. */ +#ifdef __sun +#define _POSIX_PTHREAD_SEMANTICS /* Required on Solaris 11 (see ENT-13146) */ +#endif /* __sun */ + #include #include #include