patch-htpdate_c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- htpdate-1.1.1.orig/htpdate.c 2014-10-28 21:29:36.000000000 +0100
  2. +++ htpdate-1.1.1/htpdate.c 2015-02-03 06:07:38.000000000 +0100
  3. @@ -353,6 +353,7 @@ static int setclock( double timedelta, i
  4. }
  5. +#if 0
  6. static int htpdate_adjtimex( double drift ) {
  7. struct timex tmx;
  8. long freq;
  9. @@ -381,7 +382,7 @@ static int htpdate_adjtimex( double drif
  10. }
  11. }
  12. -
  13. +#endif
  14. static void showhelp() {
  15. puts("htpdate version "VERSION"\n\
  16. @@ -406,7 +407,6 @@ Usage: htpdate [-046abdhlqstxD] [-i pid
  17. -s set time\n\
  18. -t turn off sanity time check\n\
  19. -u run daemon as user\n\
  20. - -x adjust kernel clock\n\
  21. host web server hostname or ip address (maximum of 16)\n\
  22. port port number (default 80 and 8080 for proxy server)\n");
  23. @@ -586,9 +586,11 @@ int main( int argc, char *argv[] ) {
  24. }
  25. }
  26. break;
  27. +#if 0
  28. case 'x': /* adjust time and "kernel" */
  29. setmode = 3;
  30. break;
  31. +#endif
  32. case 'D': /* run as daemon */
  33. daemonize = 1;
  34. logmode = 1;
  35. @@ -779,6 +781,7 @@ int main( int argc, char *argv[] ) {
  36. printlog( 0, "Drift %.2f PPM, %.2f s/day", \
  37. drift*1e6, drift*86400 );
  38. +#if 0
  39. /* Adjust system clock */
  40. if ( setmode == 3 ) {
  41. starttime = time(NULL);
  42. @@ -789,6 +792,7 @@ int main( int argc, char *argv[] ) {
  43. /* Drop root privileges again */
  44. if ( sw_uid ) seteuid( sw_uid );
  45. }
  46. +#endif
  47. } else {
  48. starttime = time(NULL);
  49. }