diff --git a/configure.ac b/configure.ac index cb9c7a3..b5aa34b 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,7 @@ AM_CONDITIONAL([IRDA], [test "$irda_win32" = "yes" || test "$irda_linux" = "yes" AC_CHECK_HEADERS([linux/serial.h]) AC_CHECK_HEADERS([IOKit/serial/ioss.h]) AC_CHECK_HEADERS([getopt.h]) +AC_CHECK_HEADERS([sys/param.h]) # Checks for global variable declarations. AC_CHECK_DECLS([optreset]) diff --git a/examples/dctool.c b/examples/dctool.c index c3ac6c0..a317980 100644 --- a/examples/dctool.c +++ b/examples/dctool.c @@ -31,6 +31,9 @@ #ifdef HAVE_GETOPT_H #include #endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif #include #include @@ -40,13 +43,17 @@ #include "utils.h" #if defined(__GLIBC__) || defined(__MINGW32__) -#define NOPERMUTATION "+" #define RESET 0 #else -#define NOPERMUTATION "" #define RESET 1 #endif +#if defined(__GLIBC__) || defined(__MINGW32__) || defined(BSD) +#define NOPERMUTATION "+" +#else +#define NOPERMUTATION "" +#endif + static const dctool_command_t *g_commands[] = { &dctool_help, &dctool_version,