When I try to build master code on latest Solaris build snv_117, I found it build with following error: /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I../libck-connector -I/usr/sfw/include -i -g -xstrconst -xpentium -mr -xregs=no%frameptr -I/usr/sfw/include -DANSICPP -c pam-ck-connector.c -KPIC -DPIC -o .libs/pam-ck-connector.o "pam-ck-connector.c", line 201: prototype mismatch: 4 args passed, 5 expected [...] cc: acomp failed for pam-ck-connector.c
Created attachment 26949 [details] [review] no difference for getpwnam_r() between Solaris and others Checked solaris pwd.h, uses POSIX getpwnam_r(). 151 #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) 152 153 #ifdef __PRAGMA_REDEFINE_EXTNAME 154 #pragma redefine_extname getpwuid_r __posix_getpwuid_r 155 #pragma redefine_extname getpwnam_r __posix_getpwnam_r 156 extern int getpwuid_r(uid_t, struct passwd *, char *, int, struct passwd **); 157 extern int getpwnam_r(const char *, struct passwd *, char *, 158 int, struct passwd **); It turns out x11 on Solaris define _POSIX_PTHREAD_SEMANTICS $pkg-config --cflags x11 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/X11/include So, we need not "#ifdef __sun .. #else" code in pam-ck-connector.c static uid_t _util_name_to_uid( [...] #ifdef __sun pwdp = getpwnam_r (username, &pwd, buf, bufsize); if (pwdp == NULL) { goto out; } #else rc = getpwnam_r (username, &pwd, buf, bufsize, &pwdp); if (rc != 0 || pwdp == NULL) { goto out; } #endif So the patch is easy to come.
This patch is actually revert the change for close bug #18173, the 6. change on comment #2.
Committed
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.