From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752282AbbJBF0w (ORCPT ); Fri, 2 Oct 2015 01:26:52 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36384 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbbJBF0v (ORCPT ); Fri, 2 Oct 2015 01:26:51 -0400 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Frederic Weisbecker , Stephane Eranian , David Ahern , Andi Kleen Subject: [RFC/PATCH 28/38] perf tools: Move BUILD_ID_SIZE definition to perf.h Date: Fri, 2 Oct 2015 14:22:54 +0900 Message-Id: <1443763384-6247-1-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 2.6.0 In-Reply-To: <1443763159-29098-1-git-send-email-namhyung@kernel.org> References: <1443763159-29098-1-git-send-email-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The util/event.h includes util/build-id.h only for BUILD_ID_SIZE. This is a problem when I include util/event.h from util/tool.h which is also included by util/build-id.h since it now makes a circular dependency resulting in incomplete type error. Signed-off-by: Namhyung Kim --- tools/perf/perf.h | 3 +++ tools/perf/util/build-id.h | 3 --- tools/perf/util/dso.h | 1 + tools/perf/util/event.h | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/perf.h b/tools/perf/perf.h index df7c208abb74..d21b5c63f244 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -31,6 +31,9 @@ static inline unsigned long long rdclock(void) #define MAX_NR_CPUS 1024 +#define BUILD_ID_SIZE 20 +#define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1) + extern const char *input_name; extern bool perf_host, perf_guest; extern const char perf_version_string[]; diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h index 27a14a8a945b..8f9a5720bc5e 100644 --- a/tools/perf/util/build-id.h +++ b/tools/perf/util/build-id.h @@ -1,9 +1,6 @@ #ifndef PERF_BUILD_ID_H_ #define PERF_BUILD_ID_H_ 1 -#define BUILD_ID_SIZE 20 -#define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1) - #include "tool.h" #include "strlist.h" #include diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index fc8db9c764ac..416b9a57fcb9 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -9,6 +9,7 @@ #include #include #include "map.h" +#include "perf.h" #include "build-id.h" enum dso_binary_type { diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index a0dbcbd4f6d8..3812d645362c 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -6,7 +6,6 @@ #include "../perf.h" #include "map.h" -#include "build-id.h" #include "perf_regs.h" struct mmap_event { -- 2.6.0