diff options
author | tnn <tnn@pkgsrc.org> | 2019-11-20 23:04:23 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2019-11-20 23:04:23 +0000 |
commit | a8c59add2a841f2518f08fafbecf914cba4e203e (patch) | |
tree | c022fc3ece26cad44707f3fd6d47d55cc87b8866 | |
parent | 82b6864cd80f26c18fa7d6693eb59bbfe6dc72af (diff) | |
download | pkgsrc-a8c59add2a841f2518f08fafbecf914cba4e203e.tar.gz |
compton: fix build w/ -D_FORTIFY_SOURCE=2
-rw-r--r-- | x11/compton/distinfo | 3 | ||||
-rw-r--r-- | x11/compton/patches/patch-src_backend_gl_gl__common.c | 42 |
2 files changed, 44 insertions, 1 deletions
diff --git a/x11/compton/distinfo b/x11/compton/distinfo index e2ef62f95d9..12eb35a958a 100644 --- a/x11/compton/distinfo +++ b/x11/compton/distinfo @@ -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 @@ SHA512 (compton-7.3.tar.gz) = 5a8fd294a8f39fd926029e872f0c8c998ccc105cb408b05853 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 --git a/x11/compton/patches/patch-src_backend_gl_gl__common.c b/x11/compton/patches/patch-src_backend_gl_gl__common.c new file mode 100644 index 00000000000..1aa60a065d1 --- /dev/null +++ b/x11/compton/patches/patch-src_backend_gl_gl__common.c @@ -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; |