From 55c39bae67cb3b26dacb78a9d45fcd900745c3d8 Mon Sep 17 00:00:00 2001 From: zwelch Date: Wed, 29 Apr 2009 00:33:35 +0000 Subject: [PATCH] Add missing header files to fix C99 compatibility. git-svn-id: svn://svn.berlios.de/openocd/trunk@1559 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- configure.in | 1 + src/helper/jim-eventloop.c | 1 + src/helper/replacements.h | 9 ++++++++- src/jtag/jtag.c | 7 +++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 88590137..364a3d88 100644 --- a/configure.in +++ b/configure.in @@ -9,6 +9,7 @@ AC_SEARCH_LIBS([dlopen], [dl]) AC_CHECK_HEADERS(jtag_minidriver.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/time.h) +AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(elf.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(stdbool.h) diff --git a/src/helper/jim-eventloop.c b/src/helper/jim-eventloop.c index 62513704..d0b3ff01 100644 --- a/src/helper/jim-eventloop.c +++ b/src/helper/jim-eventloop.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include "replacements.h" diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 2725d945..8e1e51d0 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -35,7 +35,14 @@ #if BUILD_ECOSBOARD #include #include -#include +#endif + +#ifdef HAVE_SYS_SELECT_H +#include /* select, FD_SET and friends (POSIX.1-2001) */ +#endif + +#ifdef HAVE_SYS_TIME_H +#include /* FD_SET and friends (pre-POSIX.1-2001) */ #endif /* include necessary headers for socket functionality */ diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 91d08638..c1e2648b 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -35,9 +35,12 @@ #include "command.h" #include "log.h" -#include "stdlib.h" -#include "string.h" +#include +#include #include +#ifdef HAVE_STRINGS_H +#include +#endif /* note that this is not marked as static as it must be available from outside jtag.c for those that implement the jtag_xxx() minidriver layer -- 2.39.5