Re: [HACKERS] 7.4.2 Build broken on (Sparc) Solaris 7 and

Started by Bruce Momjianover 22 years ago1 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Joe Conway wrote:

Bruce Momjian wrote:

OK, patch attached and applied. It adds configure tests for the 5-arg
version of getpwuid_r() and properly falls back to the Posix draft
version you have on Solaris. Seems Solaris 9 also still has the draft
version.

! result = getpwuid_r(uid, resultbuf, buffer, buflen);

Bruce,

I'm getting core dumps on:

7.4.2 with this patch
bash-2.03$ uname -a
SunOS col65 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-280R

Shouldn't the line above actually be:

*result = getpwuid_r(uid, resultbuf, buffer, buflen);

The manpage shows this:
struct passwd *getpwuid_r(uid_t uid, struct passwd *pwd,
char *buffer, int buflen);

and the function's parameter is this:
struct passwd **result

With that change, all seems well for me.

Yes, CVS HEAD and 7.4.X patched. Thanks.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073