Commit e0d83ca3 authored by Jan Kiszka's avatar Jan Kiszka

cobalt: Fix uclibc build

Add missing forward declaration of timex, avoid incorrect alias
creations by COBALT_IMPL due to wrongly defined fputc and putchar.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent dce67fa0
...@@ -73,7 +73,7 @@ static inline int __real_putchar(int c) ...@@ -73,7 +73,7 @@ static inline int __real_putchar(int c)
int __wrap_putchar(int c); int __wrap_putchar(int c);
int __cobalt_putchar(int c); int __cobalt_putchar(int c);
#undef putchar #undef putchar
#define putchar __wrap_putchar #define putchar putchar
#endif #endif
#ifndef fputc #ifndef fputc
...@@ -86,7 +86,7 @@ static inline int __real_fputc(int c, FILE *stream) ...@@ -86,7 +86,7 @@ static inline int __real_fputc(int c, FILE *stream)
int __wrap_fputc(int c, FILE *stream); int __wrap_fputc(int c, FILE *stream);
int __cobalt_fputc(int c, FILE *stream); int __cobalt_fputc(int c, FILE *stream);
#undef fputc #undef fputc
#define fputc __wrap_fputc #define fputc fputc
#endif #endif
COBALT_DECL(size_t, COBALT_DECL(size_t,
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
extern "C" { extern "C" {
#endif #endif
struct timex;
COBALT_DECL(int, clock_getres(clockid_t clock_id, COBALT_DECL(int, clock_getres(clockid_t clock_id,
struct timespec *tp)); struct timespec *tp));
......
...@@ -793,7 +793,6 @@ COBALT_IMPL(int, puts, (const char *s)) ...@@ -793,7 +793,6 @@ COBALT_IMPL(int, puts, (const char *s))
} }
} }
#undef fputc
COBALT_IMPL(int, fputc, (int c, FILE *stream)) COBALT_IMPL(int, fputc, (int c, FILE *stream))
{ {
if (!cobalt_is_relaxed()) if (!cobalt_is_relaxed())
...@@ -804,7 +803,6 @@ COBALT_IMPL(int, fputc, (int c, FILE *stream)) ...@@ -804,7 +803,6 @@ COBALT_IMPL(int, fputc, (int c, FILE *stream))
} }
} }
#undef putchar
COBALT_IMPL(int, putchar, (int c)) COBALT_IMPL(int, putchar, (int c))
{ {
if (!cobalt_is_relaxed()) if (!cobalt_is_relaxed())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment