Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid warning on 32bit #233

Merged
merged 3 commits into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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