zephyr/lib/libc/arcmwdt/include/stdio.h
Ilya Tagunov de18565e2a lib: libc: arcmwdt: replace the fileno macro
The fileno macro defined in ARC MWDT headers conflicts with the fileno()
function defined in lib/posix/options/device_io.c. We should undefine it
and replace with a POSIX-compliant declaration and a weak definition.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00

27 lines
375 B
C

/*
* Copyright (c) 2024 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef LIB_LIBC_ARCMWDT_INCLUDE_STDIO_H_
#define LIB_LIBC_ARCMWDT_INCLUDE_STDIO_H_
#include_next <stdio.h>
#ifdef fileno
#undef fileno
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int fileno(FILE *file);
#ifdef __cplusplus
}
#endif
#endif /* LIB_LIBC_ARCMWDT_INCLUDE_STDIO_H_ */