From: Sedat Dilek Subject: [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3 Date: Sat, 13 Sep 2014 19:45:01 +0200 Message-ID: <1410630301-14108-1-git-send-email-sedat.dilek@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CE486E067 for ; Sat, 13 Sep 2014 10:45:12 -0700 (PDT) Received: by mail-qa0-f53.google.com with SMTP id n8so2137608qaq.12 for ; Sat, 13 Sep 2014 10:45:12 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx , Chris Wilson Cc: Sedat Dilek List-Id: intel-gfx@lists.freedesktop.org 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 --- src/uxa/intel_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index f31f7bd..9f527fd 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -1179,7 +1179,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) intel->dri3 = DRI_NONE; } +#if HAVE_DRI3 intel_sync_close(screen); +#endif xf86GARTCloseScreen(scrn->scrnIndex); -- 2.1.0