buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51701, lwip_fcntl signature is incorrect

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #51701: lwip_fcntl signature is incorrect

Submitter:  Ray Bellis <raybellis>
Submitted:  Wed 09 Aug 2017 09:49:34 AM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Fri 25 Aug 2017 08:08:09 PM UTC, comment #5: 

Fixed for LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES.

Actually, the summary is wrong as it's 'fnctl' which has a different signature, not 'lwipo_fnctl' -> fixed in that spirit.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 22 Aug 2017 08:04:45 PM UTC, comment #4: 


> There's already code using &lt;stdarg.h&gt; in src/include/netif/ppp/ppp_impl.h


First, PPP is different because it's code ported from somewhere else and we don't want to have too many diffs there.
2nd, this is for debug code only (PRINTPKT_SUPPORT).

We could make it use varargs for LWIP_COMPAT_SOCKETS==2. That way, we don't add the varargs requirements for everyone not using this standard function with external definitions.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 11 Aug 2017 10:41:54 PM UTC, comment #3: 

That should have read unlike varargs, not "unless" !

Ray Bellis <raybellis>
Fri 11 Aug 2017 10:25:09 PM UTC, comment #2: 

There's already code using &lt;stdarg.h&gt; in src/include/netif/ppp/ppp_impl.h

In any event, &lt;stdarg.h&gt; is a proper (and portable) part of the C standard, unless it's &lt;varargs.h&gt; predecessor.

Ray Bellis <raybellis>
Fri 11 Aug 2017 06:33:23 PM UTC, comment #1: 

Well, from the standards point of view, you're right. I guess the implementation is like it is to prevent using potentially unportable varargs code...

Simon Goldschmidt <goldsimon>
Group administrator
Wed 09 Aug 2017 09:49:34 AM UTC, original submission:  

The usual signature for fcntl is (int, int, ...), but lwIP uses an int instead of the varargs for the final parameter.

This causes function definition conflicts when lwIP is used in POSIX compatibility mode.

Ray Bellis <raybellis>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by raybellis (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-25 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code