diff mbox series

[16/32] include: move TFR to osdep.h

Message ID 20220323155743.1585078-17-marcandre.lureau@redhat.com
State New
Headers show
Series Misc cleanups | expand

Commit Message

Marc-André Lureau March 23, 2022, 3:57 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The macro requires EINTR, which has its header included in osdep.h.

(Not sure what TFR stands for, perhaps "Test For Retry". Rename it ?)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu-common.h | 2 --
 include/qemu/osdep.h  | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/qemu-common.h b/include/qemu-common.h
index f9b3f85b8124..db8b03be51f3 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -10,8 +10,6 @@ 
 #ifndef QEMU_COMMON_H
 #define QEMU_COMMON_H
 
-#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
-
 /* Copyright string for -version arguments, About dialogs, etc */
 #define QEMU_COPYRIGHT "Copyright (c) 2003-2022 " \
     "Fabrice Bellard and the QEMU Project developers"
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 240b48707ecc..489a5d1aad5f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -226,6 +226,8 @@  extern "C" {
 #define ESHUTDOWN 4099
 #endif
 
+#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
+
 /* time_t may be either 32 or 64 bits depending on the host OS, and
  * can be either signed or unsigned, so we can't just hardcode a
  * specific maximum value. This is not a C preprocessor constant,