From: Hal Murray Date: Fri, 31 Dec 2010 21:28:55 +0000 (-0500) Subject: refclock_conf.c, configure.ac, refclock_palisade.c, ChangeLog: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9ce17b42c4cf09dc197c2d229cbc0e1e7b82034;p=thirdparty%2Fntp.git refclock_conf.c, configure.ac, refclock_palisade.c, ChangeLog: [Bug 1764] Palisade driver doesn't build on Linux. (cleanup) bk: 4d1e4b17l7SX1nl1lHKjhB6cSt4GKQ --- diff --git a/ChangeLog b/ChangeLog index 6c592bb02f..67a6d7bc87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ --- +* [Bug 1764] Palisade driver doesn't build on Linux * Create and use scripts/check--help when generating .texi files. * Update bk triggers for the bk-5 release. * Update genCommitLog for the bk-5 release. diff --git a/configure.ac b/configure.ac index 1ea43a564c..7c99b6534e 100644 --- a/configure.ac +++ b/configure.ac @@ -3460,6 +3460,7 @@ if test "$ntp_ok" = "yes"; then fi AC_MSG_RESULT([$ntp_ok]) +# Requires modem control AC_MSG_CHECKING([for Palisade clock]) AC_ARG_ENABLE( [PALISADE], @@ -3468,15 +3469,21 @@ AC_ARG_ENABLE( [s Palisade clock] )], [ntp_ok=$enableval], - [ - case "$ac_cv_header_termios_h" in - yes) - ntp_ok=$ntp_eac - ;; - *) ntp_ok=no - ;; - esac - ] + [AC_EGREP_CPP( + [yes], + [ + #include + #ifdef HAVE_SYS_IOCTL_H + # include + #endif + + #ifdef TIOCMBIS + yes + #endif + ], + [ntp_ok=$ntp_eac], + [ntp_ok=no] + )] ) if test "$ntp_ok" = "yes"; then ntp_refclock=yes diff --git a/ntpd/refclock_conf.c b/ntpd/refclock_conf.c index 80e50d1880..75e74dce38 100644 --- a/ntpd/refclock_conf.c +++ b/ntpd/refclock_conf.c @@ -168,7 +168,7 @@ extern struct refclock refclock_shm; #define refclock_shm refclock_none #endif -#if defined(CLOCK_PALISADE) && defined(TIOCMSET) +#ifdef CLOCK_PALISADE extern struct refclock refclock_palisade; #else #define refclock_palisade refclock_none diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c index 21f0714e28..ffe520d01d 100644 --- a/ntpd/refclock_palisade.c +++ b/ntpd/refclock_palisade.c @@ -73,10 +73,6 @@ #if defined(REFCLOCK) && defined(CLOCK_PALISADE) -#include - -# ifdef TIOCMSET - #ifdef SYS_WINNT extern int async_write(int, const void *, unsigned int); #undef write @@ -1275,7 +1271,6 @@ getlong( bp[3]; } -# endif /* TIOCMSET */ #else /* REFCLOCK && CLOCK_PALISADE*/ int refclock_palisade_c_notempty; #endif