pixman: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 17 16:17:47 UTC 2021


 test/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bd4e7a9b9e672105bda35ff736c977adbf719c6c
Author: Nirbheek Chauhan <nirbheek at centricular.com>
Date:   Mon Aug 23 19:36:26 2021 +0530

    tests: Fix undefined symbol build error on macOS
    
    prng_state and prng_state_data are getting classified as a "Common
    symbol" by the compiler due to the convoluted way in which it is
    `#include`-ed in various test sources, and that's not read as a valid
    symbol by the linker later.
    
    Initializing the symbol clarifies it to the compiler that this
    specific declaration is the canonical location for this variable, and
    that it's not a "Common symbol".
    
    Fixes https://gitlab.freedesktop.org/pixman/pixman/-/issues/42

diff --git a/test/utils.c b/test/utils.c
index cd9ab26..1c64cee 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -35,8 +35,8 @@
 /* Random number generator state
  */
 
-prng_t prng_state_data;
-prng_t *prng_state;
+prng_t prng_state_data = {0};
+prng_t *prng_state = NULL;
 
 /*----------------------------------------------------------------------------*\
  *  CRC-32 version 2.0.0 by Craig Bruce, 2006-04-29.


More information about the xorg-commit mailing list