Index: tonezone.c =================================================================== --- tonezone.c (revision 1685) +++ tonezone.c (working copy) @@ -37,6 +37,11 @@ #define CLIP 32635 #define BIAS 0x84 +/* FreeBSD does not have ENODATA, we must define it. */ +#ifndef ENODATA +#define ENODATA 61 +#endif + struct tone_zone *tone_zone_find(char *country) { struct tone_zone *z; Index: configure.ac =================================================================== --- configure.ac (revision 1685) +++ configure.ac (working copy) @@ -46,6 +46,8 @@ AC_LANG(C) +AC_CHECK_HEADERS([sys/ioctl.h]) + AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], []) AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], []) AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt]) Index: ztmonitor.c =================================================================== --- ztmonitor.c (revision 1685) +++ ztmonitor.c (working copy) @@ -45,8 +45,16 @@ #include #include #endif + +#if defined(__linux__) #include +#elif defined(__FreeBSD__) +#include +#else +#include +#endif + #define BUFFERS 4 #define FRAG_SIZE 8 Index: wctdm.h =================================================================== --- wctdm.h (revision 1685) +++ wctdm.h (working copy) @@ -26,7 +26,7 @@ #ifndef _WCTDM_H #define _WCTDM_H -#include +#include #define NUM_REGS 109 #define NUM_INDIRECT_REGS 105