subsys shell devmem_service: Fix includes
* The include for the host libC should be guarded with using the host libC instead of the POSIX arch, as this supports other C libraries. * This code uses getopt, which is an extension to the C library. Let's explicity select one of the extensions which includes it instead of relaying on somebody having set it for this file somewhere else. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
d4967b086a
commit
06f15fcc36
1 changed files with 7 additions and 4 deletions
|
@ -6,15 +6,18 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#undef _POSIX_C_SOURCE
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <zephyr/device.h>
|
#ifdef CONFIG_NATIVE_LIBC
|
||||||
#include <zephyr/shell/shell.h>
|
|
||||||
#include <zephyr/sys/byteorder.h>
|
|
||||||
#ifdef CONFIG_ARCH_POSIX
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
#include <zephyr/posix/unistd.h>
|
#include <zephyr/posix/unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <zephyr/device.h>
|
||||||
|
#include <zephyr/shell/shell.h>
|
||||||
|
#include <zephyr/sys/byteorder.h>
|
||||||
|
|
||||||
static inline bool is_ascii(uint8_t data)
|
static inline bool is_ascii(uint8_t data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue