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>
This commit is contained in:
YAMAMOTO Takashi
2024-02-13 16:31:40 +09:00
committed by Damien George
parent f9704ce36e
commit 809d113dbc
4 changed files with 14 additions and 8 deletions

View File

@@ -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"