summaryrefslogtreecommitdiffstats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorPeter Maydell2017-11-23 16:56:38 +0100
committerPeter Maydell2017-11-24 14:23:36 +0100
commite7b47c22e2df14d55e3e4426688c929bf8e3f7fb (patch)
tree86c5eb9a8a3e1a6c93b066685c3db3a96e620927 /hw/net/virtio-net.c
parenthw/arm/virt: Add 2.11 machine type (diff)
downloadqemu-e7b47c22e2df14d55e3e4426688c929bf8e3f7fb.tar.gz
qemu-e7b47c22e2df14d55e3e4426688c929bf8e3f7fb.tar.xz
qemu-e7b47c22e2df14d55e3e4426688c929bf8e3f7fb.zip
osdep.h: Make TIME_MAX handle different time_t types
In our various supported host OSes, the time_t type may be either 32 or 64 bit, and could in theory also be either signed or unsigned. Notably, in OpenBSD time_t is a 64 bit type even if 'long' is 32 bits, so using LONG_MAX for TIME_MAX is incorrect. Use an approach suggested by Paolo Bonzini which calculates the maximum value of the type rather than hardcoding it; to do this we use the TYPE_MAXIMUM macro from Gnulib. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1511452598-6077-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions