diff options
| author | YAMAMOTO Takashi <yamamoto@midokura.com> | 2024-02-13 16:31:40 +0900 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-02-15 16:54:17 +1100 |
| commit | 809d113dbc37a032e87accc95c140f189733e0c4 (patch) | |
| tree | ad0dedb323af80e3753197acf72930dbca9fcf93 /ports/unix/modsocket.c | |
| parent | f9704ce36e2396001b34d86a01b75af607901f94 (diff) | |
unix: Don't include system headers when features are disabled.
Because the target system may not have these headers at all.
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Diffstat (limited to 'ports/unix/modsocket.c')
| -rw-r--r-- | ports/unix/modsocket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ports/unix/modsocket.c b/ports/unix/modsocket.c index 737550b42..5c935d229 100644 --- a/ports/unix/modsocket.c +++ b/ports/unix/modsocket.c @@ -25,6 +25,10 @@ * THE SOFTWARE. */ +#include "py/mpconfig.h" + +#if MICROPY_PY_SOCKET + #include <stdio.h> #include <assert.h> #include <string.h> @@ -49,8 +53,6 @@ #include "extmod/vfs.h" #include <poll.h> -#if MICROPY_PY_SOCKET - /* The idea of this module is to implement reasonable minimum of socket-related functions to write typical clients and servers. |
