mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
fix(picolibc): fix missed headers in sources
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/lock.h>
|
||||
|
@@ -11,7 +11,9 @@
|
||||
#include "esp_log.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default lwip behavior is to silence LWIP_ERROR() if LWIP_DEBUG is not set.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -12,7 +12,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _RETARGETABLE_LOCKING
|
||||
#if defined(_RETARGETABLE_LOCKING) || defined(CONFIG_LIBC_PICOLIBC)
|
||||
|
||||
/* Actual platfrom-specific definition of struct __lock.
|
||||
* The size here should be sufficient for a FreeRTOS mutex.
|
||||
@@ -52,10 +52,6 @@ int _lock_try_acquire_recursive(_lock_t *plock);
|
||||
void _lock_release(_lock_t *plock);
|
||||
void _lock_release_recursive(_lock_t *plock);
|
||||
|
||||
#if CONFIG_LIBC_PICOLIBC
|
||||
#define __lock_try_acquire(lock) _lock_try_acquire(&(lock))
|
||||
#define __lock_try_acquire_recursive(lock) _lock_try_acquire_recursive(&(lock))
|
||||
#endif // CONFIG_LIBC_PICOLIBC
|
||||
#endif // _RETARGETABLE_LOCKING
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -26,6 +26,10 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct
|
||||
|
||||
#endif // fd_set
|
||||
|
||||
#if __BSD_VISIBLE && !defined(fds_bits)
|
||||
#define fds_bits __fds_bits
|
||||
#endif
|
||||
|
||||
#if defined(FD_ISSET) || defined(FD_SET) || defined(FD_CLR)
|
||||
#undef FD_SET
|
||||
#undef FD_CLR
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <sys/random.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
||||
int getentropy(void *buffer, size_t length)
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include <stdio-bufio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/signal.h>
|
||||
#include <signal.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/reent.h>
|
||||
#include <assert.h>
|
||||
|
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include "esp_log.h"
|
||||
|
||||
const static char *TAG = "esp32_asio_pthread";
|
||||
@@ -22,6 +23,8 @@ int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict os
|
||||
return 0;
|
||||
}
|
||||
|
||||
// picolibc has sigfillset macro in signal.h
|
||||
#if !CONFIG_LIBC_PICOLIBC
|
||||
int sigfillset(sigset_t *what)
|
||||
{
|
||||
ESP_LOGD(TAG, "%s: Signals not supported in ESP pthread", __func__);
|
||||
@@ -30,6 +33,7 @@ int sigfillset(sigset_t *what)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* !CONFIG_LIBC_PICOLIBC */
|
||||
|
||||
void esp_libc_include_pthread_impl(void)
|
||||
{
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include <errno.h>
|
||||
#include <reent.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_rom_uart.h"
|
||||
#include "esp_system_console.h"
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if CONFIG_LIBC_PICOLIBC
|
||||
int open(const char *pathname, int flags, ...)
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include "unity.h"
|
||||
#include "sdkconfig.h"
|
||||
|
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "soc/pmu_reg.h"
|
||||
#ifdef __cplusplus
|
||||
|
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "soc/lldesc.h"
|
||||
|
||||
void lldesc_setup_link_constrained(lldesc_t *dmadesc, const void *data, int len, int max_desc_size, bool isrx)
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/lock.h>
|
||||
|
Reference in New Issue
Block a user