kopia lustrzana https://github.com/micropython/micropython
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>pull/13674/head
rodzic
f9704ce36e
commit
809d113dbc
|
@ -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.
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if MICROPY_PY_TERMIOS
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
@ -33,8 +35,6 @@
|
|||
#include "py/runtime.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#if MICROPY_PY_TERMIOS
|
||||
|
||||
STATIC mp_obj_t mod_termios_tcgetattr(mp_obj_t fd_in) {
|
||||
struct termios term;
|
||||
int fd = mp_obj_get_int(fd_in);
|
||||
|
|
|
@ -24,14 +24,16 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK && MICROPY_BLUETOOTH_BTSTACK_H4
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK && MICROPY_BLUETOOTH_BTSTACK_H4
|
||||
|
||||
#include "lib/btstack/src/hci_transport_h4.h"
|
||||
#include "lib/btstack/chipset/zephyr/btstack_chipset_zephyr.h"
|
||||
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK && MICROPY_BLUETOOTH_BTSTACK_USB
|
||||
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -31,8 +35,6 @@
|
|||
#include "py/mperrno.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#if MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK && MICROPY_BLUETOOTH_BTSTACK_USB
|
||||
|
||||
#include "lib/btstack/src/btstack.h"
|
||||
#include "lib/btstack/src/hci_transport_usb.h"
|
||||
#include "lib/btstack/platform/embedded/btstack_run_loop_embedded.h"
|
||||
|
|
Ładowanie…
Reference in New Issue