Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190.
[oweals/busybox.git] / adjtimex.c
index 02b6e89b0f47b7dfba78b8e77e34097c5889b480..e3c160d879c987676715cbe1d36973c09a2d8823 100644 (file)
 #include <sys/types.h>
 #include <stdlib.h>
 #include <unistd.h>
+
+#if __GNU_LIBRARY__ < 5
+#include <sys/timex.h>
+extern int adjtimex(struct timex *buf);
+#else
 #include <sys/timex.h>
+#endif
+
 #ifdef BB_VER
 #include "busybox.h"
 #endif
@@ -163,7 +170,7 @@ int main(int argc, char ** argv)
                        "    return value: %d (%s)\n",
                txc.constant,
                txc.precision, txc.tolerance, txc.tick,
-               txc.time.tv_sec, txc.time.tv_usec, ret, descript);
+               (long)txc.time.tv_sec, (long)txc.time.tv_usec, ret, descript);
        }
        return (ret<0);
 }