patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9132, Android compatibility for UNIX port

 
 

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

patch #9132: Android compatibility for UNIX port

Submitted by:  Brian Armstrong <brian_armstrong>
Submitted on:  Mon 03 Oct 2016 11:44:11 PM UTC  
 
Category:  Contrib Priority:  3 - Low
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Wed 05 Oct 2016 10:20:59 AM UTC, comment #2: 

Thanks for the patch (applied it manually)!

Dirk Ziegelmeier <dziegel>
Project Administrator
Tue 04 Oct 2016 07:55:21 AM UTC, comment #1: 

The patch does not apply, it does not seem to be generated against the lwIP rep (refspec 52f508c not found)

Dirk Ziegelmeier <dziegel>
Project Administrator
Mon 03 Oct 2016 11:44:11 PM UTC, original submission:  

I have built my project, which uses lwIP, under the Android NDK. I don't know if you guys would be interested in these changes but I figured I'd offer them if you like.

This ended up a little messy. For some versions of Android, pthread_condattr_setclock is not available, but pthread_cond_timedwait_relative_np is. In later versions, Android resembles the portable standard, and the situation reverses. This patch includes a file that defines the api level in order to correct for this when the compiler _ANDROID_ is present.

One other tricky bit here is that Android's sys/time.h is a little unorthodox. As I understand it, this file typically defines FD_SET and fd_set. In Android, for some api versions, sys/time.h defines FD_SET but not fd_set (sys/select.h instead defines fd_set). In these cases, I've made the patch define fd_set from __kernel_fd_set, which is what sys/select.h does. In later versions, neither FD_SET nor fd_set are defined in sys/time.h and are instead only defined in sys/select.h. In these cases, the code ignores what is defined entirely and just defines its own FD_SET.

Thanks,
Brian

Brian Armstrong <brian_armstrong>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-05 dziegel StatusNone => Done
        Open/ClosedOpen => Closed
    2016-10-03 brian_armstrong Attached File- => Added android_patch.txt, #38658

    Back to the top


    Powered by Savane 3.5