]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
automerge + conflict resolution.
authorHarlan Stenn <stenn@ntp.org>
Sun, 2 Dec 2001 17:23:39 +0000 (12:23 -0500)
committerHarlan Stenn <stenn@ntp.org>
Sun, 2 Dec 2001 17:23:39 +0000 (12:23 -0500)
bk: 3c0a639bw54oAgp0OTGgQjchrsX8VQ

1  2 
configure.in
libntp/machines.c

diff --cc configure.in
Simple merge
index b2001fe12b41f1642c9bc2209dfc9136b539d3de,4d63f3cf9d18595bbe3890e59590dcfde5cc84f9..05ce6eb7ac5c88e5e4b026a076a04805242d13f0
@@@ -417,28 -417,36 +417,37 @@@ ntp_set_tod
        void *tzp
        )
  {
-       int rc;
+       int rc = -1;
 -      struct timeval adjtv;
+ #ifdef DEBUG
+       if (debug)
+           printf("In ntp_set_tod\n");
+ #endif
  
  #ifdef HAVE_CLOCK_SETTIME
-       {
+       if (rc) {
                struct timespec ts;
  
+               set_tod_using = "clock_settime";
                /* Convert timeval to timespec */
                ts.tv_sec = tvp->tv_sec;
                ts.tv_nsec = 1000 *  tvp->tv_usec;
  
+               errno = 0;
                rc = clock_settime(CLOCK_REALTIME, &ts);
-               if (!rc)
-               {
-                       set_tod_using = "clock_settime";
-                       return rc;
-               }
        }
+ #ifdef DEBUG
+       if (debug) {
+               printf("ntp_set_tod: %s: %d: %s\n",
+                       set_tod_using, rc, strerror(errno));
+       }
+ #endif
  #endif /* HAVE_CLOCK_SETTIME */
  #ifdef HAVE_SETTIMEOFDAY
-       {
+       if (rc) {
 +              struct timeval adjtv;
 +
+               set_tod_using = "settimeofday";
                /*
                 * Some broken systems don't reset adjtime() when the
                 * clock is stepped.