diff --git a/include/syscall.h b/include/syscall.h index 545a1c39bc..5ffc0f4283 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -33,6 +33,18 @@ * Pre-processor Definitions ****************************************************************************/ +#ifdef CONFIG_LIB_SYSCALL +# ifndef UP_WRAPSYM +# define UP_WRAPSYM(s) __wrap_##s +# endif +# ifndef UP_REALSYM +# define UP_REALSYM(s) __real_##s +# endif +#else +# define UP_WRAPSYM(s) s +# define UP_REALSYM(s) s +#endif + /**************************************************************************** * Public Type Definitions ****************************************************************************/ diff --git a/tools/mksyscall.c b/tools/mksyscall.c index a03c8080ef..b9ebac8d29 100644 --- a/tools/mksyscall.c +++ b/tools/mksyscall.c @@ -595,13 +595,7 @@ static void generate_wrapper(int nfixed, int nparms) /* Define macros to get wrapper symbol */ - fprintf(stream, "#include \n"); - fprintf(stream, "#ifndef UP_WRAPSYM\n"); - fprintf(stream, "#define UP_WRAPSYM(s) __wrap_##s\n"); - fprintf(stream, "#endif\n"); - fprintf(stream, "#ifndef UP_REALSYM\n"); - fprintf(stream, "#define UP_REALSYM(s) __real_##s\n"); - fprintf(stream, "#endif\n\n"); + fprintf(stream, "#include \n\n"); if (g_parm[COND_INDEX][0] != '\0') {