From patchwork Wed Jul 25 19:16:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Anderson X-Patchwork-Id: 10545295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06301180E for ; Thu, 26 Jul 2018 07:08:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E28322A99B for ; Thu, 26 Jul 2018 07:08:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D39B12A9A8; Thu, 26 Jul 2018 07:08:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B3A82A99B for ; Thu, 26 Jul 2018 07:08:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9A9E6E31F; Thu, 26 Jul 2018 07:08:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA1836E175 for ; Wed, 25 Jul 2018 19:16:20 +0000 (UTC) Received: by mail-oi0-x234.google.com with SMTP id k81-v6so15848102oib.4 for ; Wed, 25 Jul 2018 12:16:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zWBctXoZI0JbAUrhCwWvrwuCm2TWkbhrXNRFpSfdQmQ=; b=MmmeuxisAWoqF08mS6d29xtKUwhfXUH8wC95OW/IaZLKlrgr1lppdY0ZbgPUxOz19+ JHEueFa1Mv457J3zS5N+t/xM4GvHTra1KfDeQfj4EOLmWQg1RE9R9lGAoatxTjAq0VjV 1lDfBssWVF2wH07x6nFVR2svCjUfBmjYQPSXy7d+49pH0wULkVPP6PpvMwCTSEIkbrK2 JdvfsUNPI5fX0mULGisgGnvlRUKBZUUAWUiY5n9AP9TwzXGYxqVgJqMN2LVheI0cy3KE l1rFaVIaQsffvI7DUqupBG9S7QuHTy334BfNyXPrD46m3LOqaE/FYYxbsqpLl9aO3lQ5 3RyQ== X-Gm-Message-State: AOUpUlEQBYISePMMuhQJdFgsYppXhK6a1RKrwBT5PMMk1RxfUwcvWjCS Pd5JVubW1+l/GO1IE41etiNM/+U+fS+I4m7RoOj+VKep X-Google-Smtp-Source: AAOMgpe34pQfud4kWEJROxmG3FkIf2sRbJeX3MTcuPNAj/dRSDDML9K+Zp6XkA8379b34k3jvU4WWmD5DNYDJe9Ny9g= X-Received: by 2002:aca:3805:: with SMTP id f5-v6mr4322121oia.310.1532546179554; Wed, 25 Jul 2018 12:16:19 -0700 (PDT) MIME-Version: 1.0 From: Tom Anderson Date: Wed, 25 Jul 2018 12:16:08 -0700 Message-ID: Subject: [libdrm patch] Fix build with -std=c11 To: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Thu, 26 Jul 2018 07:08:25 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hello, I have a simple one-line patch that fixes the libdrm build with -std=c11. I would appreciate if anyone with commit access could merge the attached change on my behalf. Thanks! Tom Reviewed-by: Eric Engestrom From fc7a593454030df2b06e5b9dbafaa666d51a30ac Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Wed, 25 Jul 2018 12:06:29 -0700 Subject: [PATCH] Fix build with -std=c11 typeof() is a GNU extension that will only work when the compiler is passed -std=gnu*. __typeof__() works with -std=c*, however. --- util_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util_math.h b/util_math.h index 02b15a8e..35bf4512 100644 --- a/util_math.h +++ b/util_math.h @@ -29,6 +29,6 @@ #define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C)) #define __align_mask(value, mask) (((value) + (mask)) & ~(mask)) -#define ALIGN(value, alignment) __align_mask(value, (typeof(value))((alignment) - 1)) +#define ALIGN(value, alignment) __align_mask(value, (__typeof__(value))((alignment) - 1)) #endif /*_UTIL_MATH_H_*/ -- 2.18.0.233.g985f88cf7e-goog