lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #9132] Android compatibility for UNIX port


From: Brian Armstrong
Subject: [lwip-devel] [patch #9132] Android compatibility for UNIX port
Date: Mon, 3 Oct 2016 23:44:13 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0

URL:
  <http://savannah.nongnu.org/patch/?9132>

                 Summary: Android compatibility for UNIX port
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: brian_armstrong
            Submitted on: Mon 03 Oct 2016 11:44:11 PM GMT
                Category: Contrib
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

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



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 03 Oct 2016 11:44:11 PM GMT  Name: android_patch.txt  Size: 2kB  
By: brian_armstrong

<http://savannah.nongnu.org/patch/download.php?file_id=38658>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9132>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]