help icon indicating copy to clipboard operation
help copied to clipboard

gcc error: getpwuid_r struct msghdr on Solaris/SunOS

Open wolance opened this issue 6 years ago • 8 comments

hi when compile libuv, have this error. libuv/src/unix/core.c:683:10: error: 'struct msghdr' has no member named 'msg_controllen' if (msg->msg_controllen == 0) libuv/src/unix/core.c:1188:9: error: too many arguments to function 'getpwuid_r' r = getpwuid_r(uid, &pw, buf, bufsize, &result); i dont know solve it, please help me...3q

SunOS mysunos 5.10 Generic_147148-26 i86pc i386 i86pc libuv 1.15.1 maybe...i look up uv-version.h

图片

see https://github.com/libuv/libuv/issues/1458 yes, same as, then...... 图片 OK...i search some info....tell me use CC -std=gnu99 well....look nice.....then........................what..........

图片

link error..... ok,,,,i have not other method...yours?

wolance avatar Oct 29 '19 11:10 wolance

cc @libuv/smartos

saghul avatar Oct 29 '19 12:10 saghul

Sounds like this isn't quite SmartOS. What does uname -a show on your system? Also, what version of libuv are you working with?

cjihrig avatar Oct 29 '19 12:10 cjihrig

Didn't we used to fold SunOS into SmartOS? Sorry for the noise otherwise!

saghul avatar Oct 29 '19 12:10 saghul

We started differentiating SmartOS and SunOS in https://github.com/libuv/libuv/commit/3af5512950bd6f3a0d386b0825cdd3e78a3e7f48 as a result of https://github.com/libuv/libuv/pull/991#issuecomment-239221805 and https://github.com/libuv/libuv/issues/1458#issuecomment-320322647.

cjihrig avatar Oct 29 '19 12:10 cjihrig

LoL, I was there didn't quite remember. Oopsie.

saghul avatar Oct 29 '19 12:10 saghul

Sounds like this isn't quite SmartOS. What does uname -a show on your system? Also, what version of libuv are you working with?

SunOS mysunos 5.10 Generic_147148-26 i86pc i386 i86pc

wolance avatar Oct 30 '19 02:10 wolance

libuv 1.15.1 maybe...i look up uv-version.h

You're probably using 1.15.0 or 1.16.0, as there doesn't seem to be a 1.15.1. Either way, those releases are ~2 years old at this point. You should really upgrade. It should be straightforward, as the v1.x branch has remained API and ABI stable with the exception of a few mistakes.

Unfortunately, SunOS is a Tier 3 platform under libuv's support plan. That means none of the maintainers are really invested in it, and we don't have CI resources to test it. Community patches are always welcome, and are accepted if they are reasonable and don't break other platforms.

Looking at https://docs.oracle.com/cd/E36784_01/html/E36874/getpwuid-r-3c.html, it appears that Solaris returns a struct passwd*, while most other platforms pass that data as an out parameter.

cjihrig avatar Oct 30 '19 15:10 cjihrig

libuv 1.15.1 maybe...i look up uv-version.h

You're probably using 1.15.0 or 1.16.0, as there doesn't seem to be a 1.15.1. Either way, those releases are ~2 years old at this point. You should really upgrade. It should be straightforward, as the v1.x branch has remained API and ABI stable with the exception of a few mistakes.

Unfortunately, SunOS is a Tier 3 platform under libuv's support plan. That means none of the maintainers are really invested in it, and we don't have CI resources to test it. Community patches are always welcome, and are accepted if they are reasonable and don't break other platforms.

Looking at https://docs.oracle.com/cd/E36784_01/html/E36874/getpwuid-r-3c.html, it appears that Solaris returns a struct passwd*, while most other platforms pass that data as an out parameter.

thx... i have been fix ...some...code... now,compile pass...but...i dont know if its working in my program ...thx all.

wolance avatar Oct 31 '19 01:10 wolance