dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [libdrm patch] Fix build with -std=c11
@ 2018-07-25 19:16 Tom Anderson
  2018-07-31 23:30 ` Tom Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Anderson @ 2018-07-25 19:16 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 189 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 271 bytes --]

[-- Attachment #2: 0001-Fix-build-with-std-c11.patch --]
[-- Type: text/x-patch, Size: 904 bytes --]

From fc7a593454030df2b06e5b9dbafaa666d51a30ac Mon Sep 17 00:00:00 2001
From: Tom Anderson <thomasanderson@chromium.org>
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


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [libdrm patch] Fix build with -std=c11
  2018-07-25 19:16 [libdrm patch] Fix build with -std=c11 Tom Anderson
@ 2018-07-31 23:30 ` Tom Anderson
  2018-08-29 14:48   ` Eric Engestrom
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Anderson @ 2018-07-31 23:30 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 370 bytes --]

Ping.  Please let me know if there's a better way I should be submitting
patches.

On Wed, Jul 25, 2018 at 12:16 PM Tom Anderson <thomasanderson@google.com>
wrote:

> 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
>

[-- Attachment #1.2: Type: text/html, Size: 688 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [libdrm patch] Fix build with -std=c11
  2018-07-31 23:30 ` Tom Anderson
@ 2018-08-29 14:48   ` Eric Engestrom
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Engestrom @ 2018-08-29 14:48 UTC (permalink / raw)
  To: Tom Anderson; +Cc: dri-devel

On Tuesday, 2018-07-31 16:30:12 -0700, Tom Anderson wrote:
> Ping.

Hey, sorry this one almost fell through the cracks.

I believe this patch is correct, so it has my
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

I'll run a couple build tests just to make sure and push it later :)

> Please let me know if there's a better way I should be submitting
> patches.

In the future, you should probably follow the guide there to send your
patches; it will greatly improve the chances of someone reviewing it :)
https://mesa3d.org/submittingpatches.html

> 
> On Wed, Jul 25, 2018 at 12:16 PM Tom Anderson <thomasanderson@google.com>
> wrote:
> 
> > 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
> >

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-29 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25 19:16 [libdrm patch] Fix build with -std=c11 Tom Anderson
2018-07-31 23:30 ` Tom Anderson
2018-08-29 14:48   ` Eric Engestrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).