diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-24 21:20:38 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-24 21:20:38 +0300 |
commit | 3c9b24bebeb573d10c1187fcf40ec1e1bb1bd7f2 (patch) | |
tree | 597cee63e369e4d49c35157647f36f63ec44ab41 /unix/modsocket.c | |
parent | 141df2d35043feaefe895e0e96f030264f0bfd40 (diff) | |
download | micropython-3c9b24bebeb573d10c1187fcf40ec1e1bb1bd7f2.tar.gz micropython-3c9b24bebeb573d10c1187fcf40ec1e1bb1bd7f2.zip |
modsocket: Fix uClibc detection.
Diffstat (limited to 'unix/modsocket.c')
-rw-r--r-- | unix/modsocket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/modsocket.c b/unix/modsocket.c index 5dce46b2e9..5b3fb01877 100644 --- a/unix/modsocket.c +++ b/unix/modsocket.c @@ -366,6 +366,7 @@ STATIC mp_obj_t mod_socket_getaddrinfo(uint n_args, const mp_obj_t *args) { sprintf(buf, "%d", port); serv = buf; hints.ai_flags = AI_NUMERICSERV; +#ifdef __UCLIBC_MAJOR__ #if __UCLIBC_MAJOR__ == 0 && (__UCLIBC_MINOR__ < 9 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) #warning Working around uClibc bug with numeric service name // Older versions og uClibc have bugs when numeric ports in service @@ -377,6 +378,7 @@ STATIC mp_obj_t mod_socket_getaddrinfo(uint n_args, const mp_obj_t *args) { // to be returned. TODO: set only if not set by Python args. hints.ai_socktype = SOCK_STREAM; #endif +#endif } else { serv = mp_obj_str_get_str(args[1]); } |