]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - rt/tst-clock.c
Fix hurd build
[thirdparty/glibc.git] / rt / tst-clock.c
index 49c418d2db570bb151f54bfa07eb18e3ac763ddf..bda2d4cd094dfd8ec213fe696b20559142cacb7d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test program for POSIX clock_* functions.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
 
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
+#include <stdint.h>
 
 
 /* We want to see output immediately.  */
@@ -51,8 +52,8 @@ clock_test (clockid_t cl)
          result = 1;
        }
       else
-       printf ("clock %d: resolution = %ld.%09ld secs\n",
-               cl, ts.tv_sec, ts.tv_nsec);
+       printf ("clock %d: resolution = %jd.%09jd secs\n",
+               cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
     }
   else
     {
@@ -76,8 +77,8 @@ clock_test (clockid_t cl)
            }
          else
            {
-             printf ("clock %d: time = %ld.%09ld secs\n",
-                     cl, ts.tv_sec, ts.tv_nsec);
+             printf ("clock %d: time = %jd.%09jd secs\n",
+                     cl, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
 
              if (memcmp (&ts, &old_ts, sizeof ts) == 0)
                {