Skip to content

Commit

Permalink
Merge pull request #233 from bbonev/time32warn
Browse files Browse the repository at this point in the history
Avoid warning on 32bit
  • Loading branch information
bbonev authored Jun 12, 2022
2 parents dd6b068 + da0ca7e commit 91066e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ AC_CHECK_SIZEOF(pid_t)
AC_CHECK_SIZEOF(uid_t)
AC_CHECK_SIZEOF(gid_t)
AC_CHECK_SIZEOF(dev_t)
AC_CHECK_SIZEOF(time_t)
AC_CHECK_SIZEOF(rlim_t,,[[
#include <sys/time.h>
#include <sys/resource.h>]])
Expand Down
8 changes: 0 additions & 8 deletions src/shared/formats-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@
# error Unknown gid_t size
#endif

#if SIZEOF_TIME_T == 8
# define PRI_TIME PRIi64
#elif SIZEOF_TIME_T == 4
# define PRI_TIME PRIu32
#else
# error Unknown time_t size
#endif

#if SIZEOF_RLIM_T == 8
# define RLIM_FMT "%" PRIu64
#elif SIZEOF_RLIM_T == 4
Expand Down
4 changes: 2 additions & 2 deletions src/udev/udevadm-monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ static void print_device(struct udev_device *device, const char *source, int pro
struct timespec ts;

clock_gettime(CLOCK_MONOTONIC, &ts);
printf("%-6s[%"PRI_TIME".%06ld] %-8s %s (%s)\n",
printf("%-6s[%"PRIi64".%06ld] %-8s %s (%s)\n",
source,
ts.tv_sec, ts.tv_nsec/1000,
(int64_t)ts.tv_sec, ts.tv_nsec/1000,
udev_device_get_action(device),
udev_device_get_devpath(device),
udev_device_get_subsystem(device));
Expand Down

0 comments on commit 91066e4

Please sign in to comment.