src/os/solaris/vm/os_solaris.cpp compilation failed on SPARC
Christian Thalinger
christian.thalinger at oracle.com
Wed Oct 19 07:18:03 PDT 2011
On Oct 19, 2011, at 3:52 PM, Daniel D. Daugherty wrote:
>> Today when I tried to build solaris-sparc I got the following error:
>>
>> "/home/ct232829/hsx/hotspot-comp/7090904/src/os/solaris/vm/os_solaris.cpp", line 6440: Error: Formal argument 6 of type unsigned* in call to recvfrom(int, void*, unsigned, int, sockaddr*, unsigned*) is being passed int*.
>> "/home/ct232829/hsx/hotspot-comp/7090904/src/os/solaris/vm/os_solaris.cpp", line 6440: Error: Formal argument 6 of type unsigned* in call to recvfrom(int, void*, unsigned, int, sockaddr*, unsigned*) is being passed int*.
>>
>> The compiler used was:
>>
>> $ CC -V
>> CC: Sun C++ 5.10 SunOS_sparc 128228-09 2010/06/24
>> Usage: CC [ options ] files. Use 'CC -flags' for details
>>
>> The manpage has the following to say:
>>
>> ssize_t recvfrom(int s, void *buf, size_t len, int flags,
>> struct sockaddr *from, socklen_t *fromlen);
>>
>> So the suggested fix would be:
>>
>> diff -r e5928e7dab26 src/os/solaris/vm/os_solaris.cpp
>> --- a/src/os/solaris/vm/os_solaris.cpp
>> +++ b/src/os/solaris/vm/os_solaris.cpp
>> @@ -6437,7 +6437,7 @@ int os::recvfrom(int fd, char *buf, int
>> sockaddr *from, int *fromlen) {
>> //%%note jvm_r11
>> INTERRUPTIBLE_RETURN_INT((int)::recvfrom(fd, buf, nBytes,\
>> - flags, from, fromlen), os::Solaris::clear_interrupted);
>> + flags, from, (socklen_t*) fromlen), os::Solaris::clear_interrupted);
>> }
>>
>> int os::sendto(int fd, char *buf, int len, int flags,
>>
>> -- Chris
>
> Chris,
>
> That failure mode is covered by the following bug:
>
> 7091417 3/4 recvfrom's 6th input should be of type socklen_t
>
> Looks like the code review on hotspot-runtime-dev at openjdk.net
> ran into some issues. Paul H is the current RE so you should
> talk to him.
Hmm, right. Seems I've missed that review. I wonder how JPRT is working around this...
-- Chris
>
> Dan
>
More information about the hotspot-runtime-dev
mailing list