newlib: fixes for compatibility with newlib 3.0
This commit is contained in:
parent
4770acf1cb
commit
d15e18aa5d
|
@ -15,7 +15,11 @@
|
||||||
#ifndef __ESP_SYS_SELECT_H__
|
#ifndef __ESP_SYS_SELECT_H__
|
||||||
#define __ESP_SYS_SELECT_H__
|
#define __ESP_SYS_SELECT_H__
|
||||||
|
|
||||||
|
/* Newlib 2.2.0 does not provide sys/select.h, and fd_set is defined in sys/types.h */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifndef fd_set
|
||||||
|
#include_next <sys/select.h>
|
||||||
|
#else // fd_set
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -28,4 +32,6 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // fd_set
|
||||||
|
|
||||||
#endif //__ESP_SYS_SELECT_H__
|
#endif //__ESP_SYS_SELECT_H__
|
||||||
|
|
|
@ -41,5 +41,4 @@ void IRAM_ATTR esp_reent_init(struct _reent* r)
|
||||||
r->__sglue._next = NULL;
|
r->__sglue._next = NULL;
|
||||||
r->__sglue._niobs = 0;
|
r->__sglue._niobs = 0;
|
||||||
r->__sglue._iobs = NULL;
|
r->__sglue._iobs = NULL;
|
||||||
r->_current_locale = "C";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -460,7 +460,8 @@ void pthread_exit(void *value_ptr)
|
||||||
vTaskSuspend(NULL);
|
vTaskSuspend(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGV(TAG, "%s EXIT", __FUNCTION__);
|
// Should never be reached
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
int pthread_cancel(pthread_t thread)
|
int pthread_cancel(pthread_t thread)
|
||||||
|
|
|
@ -83,10 +83,7 @@ typedef __uint64_t uint64_t;
|
||||||
* Host to big endian, host to little endian, big endian to host, and little
|
* Host to big endian, host to little endian, big endian to host, and little
|
||||||
* endian to host byte order functions as detailed in byteorder(9).
|
* endian to host byte order functions as detailed in byteorder(9).
|
||||||
*/
|
*/
|
||||||
#if 1 //BYTE_ORDER == _LITTLE_ENDIAN
|
#if BYTE_ORDER == _LITTLE_ENDIAN
|
||||||
#define __bswap16 __bswap_16
|
|
||||||
#define __bswap32 __bswap_32
|
|
||||||
#define __bswap64 __bswap_64
|
|
||||||
#define htobe16(x) bswap16((x))
|
#define htobe16(x) bswap16((x))
|
||||||
#define htobe32(x) bswap32((x))
|
#define htobe32(x) bswap32((x))
|
||||||
#define htobe64(x) bswap64((x))
|
#define htobe64(x) bswap64((x))
|
||||||
|
|
Loading…
Reference in a new issue