#13826 closed bug (fixed)

FIONBIO size exceeds that of an int32, causing jam to fail socket_control build

Reported by: waddlesplash Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Network & Internet/Stack Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

See http://xref.plausible.coop/source/xref/haiku/src/add-ons/kernel/network/stack/net_socket.cpp#535 and http://xref.plausible.coop/source/xref/haiku/headers/posix/sys/ioctl.h#12

haiku/src/add-ons/kernel/network/stack/net_socket.cpp:553: error:
case value evaluates to 3187671041, which cannot be narrowed to type 'int32' (aka 'int')
                case FIONREAD:
                     ^

Not sure what the correct resolution for this is, so I'm filing a ticket.

Change History (3)

comment:1 by pulkomandy, 23 months ago

Casting them to int32 (or rewriting the constants to be negative), or changing the socket_control "op" parameter to be unsigned sound like possible fixes.

Making "op" unsigned is better, if we can change the ABI here. Otherwise, casting the constants to int32 sounds like the simplest thing to do (inside the switch/case, if we don't want to change the API, or at their definition otherwise)

comment:2 by waddlesplash, 23 months ago

We can make it unsigned here because the function definition is only in our kernel, but I haven't investigated how the value gets there from userland, which could be a problem. I'll look into it.

comment:3 by waddlesplash, 23 months ago

Resolution: fixed
Status: assignedclosed

Fixed (by changing to uint32) in hrev51653.

Note: See TracTickets for help on using tickets.