pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/compton compton: fix build w/ -D_FORTIFY_SOURCE=2



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77365c1a9d15
branches:  trunk
changeset: 404998:77365c1a9d15
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed Nov 20 23:04:23 2019 +0000

description:
compton: fix build w/ -D_FORTIFY_SOURCE=2

diffstat:

 x11/compton/distinfo                                  |   3 +-
 x11/compton/patches/patch-src_backend_gl_gl__common.c |  42 +++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletions(-)

diffs (62 lines):

diff -r cd8b2be8927f -r 77365c1a9d15 x11/compton/distinfo
--- a/x11/compton/distinfo      Wed Nov 20 22:50:47 2019 +0000
+++ b/x11/compton/distinfo      Wed Nov 20 23:04:23 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2019/10/21 15:56:53 pho Exp $
+$NetBSD: distinfo,v 1.8 2019/11/20 23:04:23 tnn Exp $
 
 SHA1 (compton-7.3.tar.gz) = c899bb76dd5e2eecce3e99ea5386e07f52448491
 RMD160 (compton-7.3.tar.gz) = c8c0a608e2327f2fda773ee18f1e629150fb1555
@@ -6,5 +6,6 @@
 Size (compton-7.3.tar.gz) = 218892 bytes
 SHA1 (patch-man_meson.build) = c00a05f1e5a609fc768a7cb7a29737c690ab4250
 SHA1 (patch-meson.build) = c39a4e0da8b7e6e5d3af38ea005e7915cd5e10ab
+SHA1 (patch-src_backend_gl_gl__common.c) = e702435b89018fd59d5a48f336c6cfdae644dca6
 SHA1 (patch-src_compiler.h) = 0b853c6d864a3e5ad78e1b494725aa5b19d331b8
 SHA1 (patch-src_utils.h) = 386a7fea89e12b966b9ac38df428b689ad2b63f3
diff -r cd8b2be8927f -r 77365c1a9d15 x11/compton/patches/patch-src_backend_gl_gl__common.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/compton/patches/patch-src_backend_gl_gl__common.c     Wed Nov 20 23:04:23 2019 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_backend_gl_gl__common.c,v 1.1 2019/11/20 23:04:23 tnn Exp $
+
+Parentheses are required around macro argument containing braced initializer
+list.
+memcpy(3) is a macro when using e.g. -D_FORTIFY_SOURCE=2.
+
+--- src/backend/gl/gl_common.c.orig    2019-08-18 21:40:33.000000000 +0000
++++ src/backend/gl/gl_common.c
+@@ -316,7 +316,7 @@ static void x_rect_to_coords(int nrects,
+               //          ri, rx, ry, rxe, rye, rdx, rdy, rdxe, rdye);
+ 
+               memcpy(&coord[i * 16],
+-                     (GLint[][2]){
++                     ((GLint[][2]){
+                          {vx1, vy1},
+                          {texture_x1, texture_y1},
+                          {vx2, vy1},
+@@ -325,11 +325,11 @@ static void x_rect_to_coords(int nrects,
+                          {texture_x2, texture_y2},
+                          {vx1, vy2},
+                          {texture_x1, texture_y2},
+-                     },
++                     }),
+                      sizeof(GLint[2]) * 8);
+ 
+               GLuint u = (GLuint)(i * 4);
+-              memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0},
++              memcpy(&indices[i * 6], ((GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0}),
+                      sizeof(GLuint) * 6);
+       }
+ }
+@@ -673,8 +673,8 @@ _gl_fill(backend_t *base, struct color c
+               GLint y1 = y_inverted ? height - rect[i].y2 : rect[i].y1,
+                     y2 = y_inverted ? height - rect[i].y1 : rect[i].y2;
+               memcpy(&coord[i * 8],
+-                     (GLint[][2]){
+-                         {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}},
++                     ((GLint[][2]){
++                         {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, y2}, {rect[i].x1, y2}}),
+                      sizeof(GLint[2]) * 4);
+               indices[i * 6 + 0] = (GLuint)i * 4 + 0;
+               indices[i * 6 + 1] = (GLuint)i * 4 + 1;



Home | Main Index | Thread Index | Old Index