patch-htpdate_c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- htpdate-1.0.3.orig/htpdate.c 2008-09-02 22:24:09.000000000 +0200
  3. +++ htpdate-1.0.3/htpdate.c 2009-05-29 14:28:27.252071728 +0200
  4. @@ -351,6 +351,7 @@ static int setclock( double timedelta, i
  5. }
  6. +#if 0
  7. static int htpdate_adjtimex( double drift ) {
  8. struct timex tmx;
  9. long freq;
  10. @@ -379,6 +380,7 @@ static int htpdate_adjtimex( double drif
  11. }
  12. }
  13. +#endif
  14. static void showhelp() {
  15. @@ -404,7 +406,6 @@ Usage: htpdate [-046abdhlqstxD] [-i pid
  16. -s set time\n\
  17. -t turn off sanity time check\n\
  18. -u run daemon as user\n\
  19. - -x adjust kernel clock\n\
  20. host web server hostname or ip address (maximum of 16)\n\
  21. port port number (default 80 and 8080 for proxy server)\n");
  22. @@ -584,9 +585,11 @@ int main( int argc, char *argv[] ) {
  23. }
  24. }
  25. break;
  26. +#if 0
  27. case 'x': /* adjust time and "kernel" */
  28. setmode = 3;
  29. break;
  30. +#endif
  31. case 'D': /* run as daemon */
  32. daemonize = 1;
  33. logmode = 1;
  34. @@ -777,6 +780,7 @@ int main( int argc, char *argv[] ) {
  35. printlog( 0, "Drift %.2f PPM, %.2f s/day", \
  36. drift*1e6, drift*86400 );
  37. +#if 0
  38. /* Adjust system clock */
  39. if ( setmode == 3 ) {
  40. starttime = time(NULL);
  41. @@ -787,6 +791,7 @@ int main( int argc, char *argv[] ) {
  42. /* Drop root privileges again */
  43. if ( sw_uid ) seteuid( sw_uid );
  44. }
  45. +#endif
  46. } else {
  47. starttime = time(NULL);
  48. }