From patchwork Wed Jul 9 15:06:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Nikolaev X-Patchwork-Id: 368346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AFD6C140116 for ; Thu, 10 Jul 2014 07:41:03 +1000 (EST) Received: from localhost ([::1]:33943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zbq-0002ZO-0d for incoming@patchwork.ozlabs.org; Wed, 09 Jul 2014 17:41:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4tSM-0002UE-Ng for qemu-devel@nongnu.org; Wed, 09 Jul 2014 11:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4tSD-0008JB-PJ for qemu-devel@nongnu.org; Wed, 09 Jul 2014 11:06:48 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:62684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4tSD-0008J7-HY for qemu-devel@nongnu.org; Wed, 09 Jul 2014 11:06:41 -0400 Received: by mail-we0-f180.google.com with SMTP id x48so7631247wes.25 for ; Wed, 09 Jul 2014 08:06:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=uhb7VYWbyPe2x13r5OZFQquCjFiOm8BMonaeeyO16dQ=; b=EQFPe7PzyXlehnEJ3eR0LIpa3AVpDRm6/8CkBqTvDIHerjFq/dRYs1ax7WDzwvB6Yf mrJl0nJR1BfpLC8N6KsKRdeuttHwH8StKVLUMjrdp8cyfSibrwwGkk9ia4pSNECFk2Cq ewc2GEFDar3nPm47UFO5pSmDx65w8Mf/iMbbCfGRny1sl+1wvmhA37PT9M7CNPkr27mZ NZMvkbFiqtHSpr4Q2bBhSPToe20veulO0pQX9lR1gWK+tOlL8sYqgYaX48EKub5XCIJy xYt+41n6BNhnHXK4+K2jFI2ayNO7MlRCMAAe+wXbL6NrGpPVFy0HQ5SwOPIv0X3Y+M/M WnSA== X-Gm-Message-State: ALoCoQnApXZBkR8CwO64X/cqlXzE6+mc2NL7c3fYpHvbSOsbokqsy5X/LZidWHXCRRwLNgTedrGD X-Received: by 10.180.106.66 with SMTP id gs2mr12537051wib.5.1404918400395; Wed, 09 Jul 2014 08:06:40 -0700 (PDT) Received: from [0.0.14.236] ([82.146.27.14]) by mx.google.com with ESMTPSA id s3sm103918075wje.36.2014.07.09.08.06.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jul 2014 08:06:39 -0700 (PDT) From: Nikolay Nikolaev To: kwolf@redhat.com, snabb-devel@googlegroups.com, qemu-devel@nongnu.org, mst@redhat.com Date: Wed, 09 Jul 2014 18:06:32 +0300 Message-ID: <20140709150442.6843.14602.stgit@3820> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.180 Cc: tech@virtualopensystems.com, n.nikolaev@virtualopensystems.com Subject: [Qemu-devel] [PATCH] qtest: fix vhost-user-test compilation with old GLib X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Mising G_TIME_SPAN_SECOND definition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it. Reported-by: Kevin Wolf Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index b9dcec1..75fedf0 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -22,6 +22,10 @@ #include /* GLIB version compatibility flags */ +#if !GLIB_CHECK_VERSION(2, 26, 0) +#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT(1000000)) +#endif + #if GLIB_CHECK_VERSION(2, 28, 0) #define HAVE_MONOTONIC_TIME #endif