]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
refclock_conf.c, configure.ac, refclock_palisade.c, ChangeLog:
authorHal Murray <murray@ntp.org>
Fri, 31 Dec 2010 21:28:55 +0000 (16:28 -0500)
committerHal Murray <murray@ntp.org>
Fri, 31 Dec 2010 21:28:55 +0000 (16:28 -0500)
  [Bug 1764] Palisade driver doesn't build on Linux. (cleanup)

bk: 4d1e4b17l7SX1nl1lHKjhB6cSt4GKQ

ChangeLog
configure.ac
ntpd/refclock_conf.c
ntpd/refclock_palisade.c

index 6c592bb02f32157736d17c9b7583bdeca9b9a287..67a6d7bc87cf67214f833596e788edbb0453a4c8 100644 (file)
--- 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.
index 1ea43a564c1db5911f3dbd123ef0cdc696be9739..7c99b6534e1d8d86093448f162a85d154faeba49 100644 (file)
@@ -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 <termios.h>
+           #ifdef HAVE_SYS_IOCTL_H
+           # include <sys/ioctl.h>
+           #endif
+
+           #ifdef TIOCMBIS
+               yes
+           #endif
+       ],
+       [ntp_ok=$ntp_eac],
+       [ntp_ok=no]
+    )]
 )
 if test "$ntp_ok" = "yes"; then
     ntp_refclock=yes
index 80e50d1880b00c00be08093f0c7a2debe3580655..75e74dce384793e46270e1fe51f96b64aa139d5e 100644 (file)
@@ -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
index 21f0714e287ffc4f04eeb254361b49992c4023d3..ffe520d01d400c4102635f83b1243ce1aaba3799 100644 (file)
 
 #if defined(REFCLOCK) && defined(CLOCK_PALISADE)
 
-#include <termios.h>
-
-# 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