From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sedat Dilek Subject: Re: [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3 Date: Mon, 15 Sep 2014 13:12:08 +0200 Message-ID: References: <1410630301-14108-1-git-send-email-sedat.dilek@gmail.com> <20140915075843.GS16043@nuc-i3427.alporthouse.com> Reply-To: sedat.dilek@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F58489EEB for ; Mon, 15 Sep 2014 04:12:12 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id e4so3968262wiv.11 for ; Mon, 15 Sep 2014 04:12:09 -0700 (PDT) In-Reply-To: <20140915075843.GS16043@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Sedat Dilek , intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Mon, Sep 15, 2014 at 9:58 AM, Chris Wilson wrote: > On Sat, Sep 13, 2014 at 07:45:01PM +0200, Sedat Dilek wrote: >> With LLVM v3.4.2 I got this error reported: >> ... >> intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] >> intel_sync_close(screen); >> ^ >> In file included from intel_uxa.c:44: >> ./intel_glamor.h:92:1: warning: unused function 'intel_glamor_fd_from_pixmap' [-Wunused-function] >> intel_glamor_fd_from_pixmap(ScreenPtr screen, >> ^ >> intel_driver.c:1182:2: note: did you mean 'intel_mode_close'? >> ./intel.h:356:13: note: 'intel_mode_close' declared here >> extern void intel_mode_close(intel_screen_private *intel); >> ... >> >> Looking at intel_sync_close() is only available when DRI3 is supported. >> >> 516: #if HAVE_DRI3 >> 517: Bool intel_sync_init(ScreenPtr screen); >> 518: void intel_sync_close(ScreenPtr screen); >> 519: #endif >> >> Fix the issue by embedding intel_sync_close() with a HAVE_DRI3 ifdef check. >> >> Signed-off-by: Sedat Dilek > > I went with a slightly different approach to keep the ifdefery out of > the body: > > commit 067115a51b2646538a38ba603c688233c61e23cd > Author: Chris Wilson > Date: Mon Sep 15 08:44:41 2014 +0100 > > uxa: Stub out intel_sync_init|fini when not compiled in > > In order to fix the build without DRI3, we need to stub out the > functions not compiled in, such as intel_sync_fini(). > > Reported-by: Sedat Dilek > Signed-off-by: Chris Wilson > > Thanks for the bug report and patch, Great! I was thinking of adding stubs later, but I needed a fast dirty hack. Thanks for the quick fix! - Sedat -