libuv / help

Need help with libuv? Post your question here.
28 stars 7 forks source link

gcc error: getpwuid_r struct msghdr on Solaris/SunOS #114

Open wolance opened 5 years ago

wolance commented 5 years ago

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?

saghul commented 5 years ago

cc @libuv/smartos

cjihrig commented 5 years ago

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

saghul commented 5 years ago

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

cjihrig commented 5 years ago

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.

saghul commented 5 years ago

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

wolance commented 5 years ago

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

cjihrig commented 5 years ago

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.

wolance commented 5 years ago

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.