From 87e69bfca984a6f18d583e976e9ed2e43cd8be2f 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(). 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 --- libpromises/evalfunction.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libpromises/evalfunction.c b/libpromises/evalfunction.c index 6c44694363..4cf3a76df6 100644 --- a/libpromises/evalfunction.c +++ b/libpromises/evalfunction.c @@ -22,6 +22,7 @@ included file COSL.txt. */ +#include /* must be included before pwd.h (see ENT-13146) */ #include #include #include