]> git.proxmox.com Git - mirror_qemu.git/blobdiff - util/qemu-timer-common.c
hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR)
[mirror_qemu.git] / util / qemu-timer-common.c
index 95e0847c76f3b88ee713f19f119134093a0454da..baf3317f7456e6d3f2d16bd244f03ba3f04cd467 100644 (file)
@@ -21,6 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+#include "qemu/osdep.h"
 #include "qemu/timer.h"
 
 /***********************************************************/
@@ -48,14 +49,11 @@ int use_rt_clock;
 
 static void __attribute__((constructor)) init_get_clock(void)
 {
+    struct timespec ts;
+
     use_rt_clock = 0;
-#ifdef CLOCK_MONOTONIC
-    {
-        struct timespec ts;
-        if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
-            use_rt_clock = 1;
-        }
+    if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
+        use_rt_clock = 1;
     }
-#endif
 }
 #endif