diff --git a/src/libcrun/error.c b/src/libcrun/error.c index be726c4733..812ece8b82 100644 --- a/src/libcrun/error.c +++ b/src/libcrun/error.c @@ -163,7 +163,7 @@ get_timestamp (timestamp_t *timestamp, const char *suffix) gettimeofday (&tv, NULL); gmtime_r (&tv.tv_sec, &now); strftime ((char *) timestamp, 64, "%Y-%m-%dT%H:%M:%S", &now); - sprintf (((char *) timestamp) + 19, ".%06ldZ%.8s", tv.tv_usec, suffix); + sprintf (((char *) timestamp) + 19, ".%06lldZ%.8s", (long long int) tv.tv_usec, suffix); } static void * diff --git a/src/libcrun/utils.c b/src/libcrun/utils.c index c1eb4edfeb..884f71e615 100644 --- a/src/libcrun/utils.c +++ b/src/libcrun/utils.c @@ -1811,7 +1811,7 @@ get_current_timestamp (char *out, size_t len) gmtime_r (&tv.tv_sec, &now); strftime (timestamp, sizeof (timestamp), "%Y-%m-%dT%H:%M:%S", &now); - snprintf (out, len, "%s.%06ldZ", timestamp, tv.tv_usec); + snprintf (out, len, "%s.%06lldZ", timestamp, (long long int) tv.tv_usec); out[len - 1] = '\0'; } diff --git a/tests/podman/Dockerfile b/tests/podman/Dockerfile index cf5b9f5c40..154ec5eefc 100644 --- a/tests/podman/Dockerfile +++ b/tests/podman/Dockerfile @@ -5,7 +5,7 @@ ENV PATH=/usr/bin:/usr/sbin:/root/go/bin:/usr/local/bin::/usr/local/sbin RUN dnf install -y golang python git gcc automake autoconf libcap-devel \ systemd-devel yajl-devel libseccomp-devel go-md2man \ - glibc-static python3-libmount libtool make podman xz nmap-ncat procps-ng \ + glibc-static python3-libmount libtool make podman xz nmap-ncat procps-ng slirp4netns \ device-mapper-devel containernetworking-plugins 'dnf-command(builddep)' && \ dnf builddep -y podman && \ chmod 755 /root && \