diff mbox

[RFC,1/3] os-posix: include sys/time.h

Message ID 1384307094-5836-2-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Nov. 13, 2013, 1:44 a.m. UTC
Since gettimeofday() is used in this header file as a macro define,
include the function's define header file, to avoid compile warning
when other file include os-posix.h.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 include/sysemu/os-posix.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Eric Blake Dec. 13, 2013, 1:26 p.m. UTC | #1
On 11/12/2013 06:44 PM, Wenchao Xia wrote:
> Since gettimeofday() is used in this header file as a macro define,
> include the function's define header file, to avoid compile warning
> when other file include os-posix.h.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---
>  include/sysemu/os-posix.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index 25d0b2a..f131521 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -26,6 +26,8 @@ 
 #ifndef QEMU_OS_POSIX_H
 #define QEMU_OS_POSIX_H
 
+#include <sys/time.h>
+
 void os_set_line_buffering(void);
 void os_set_proc_name(const char *s);
 void os_setup_signal_handling(void);