1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-07-13 15:29:15 -04:00
ports/x11/libxcb/files/patch-tests-check_public.c
Ruslan Makhmatkhanov fc590f3772 x11/libxcb: fix build with python3
Add upstream patches to fix build/packaging with python3 as default after
the recent update. python3 is not default, so no PORTREVISION bump is required.

PR:		214281
Submitted by:	John W. O'Brien <john@saltant.com>
Approved by:	portmgr (just-fix-it blanket)
2016-11-07 09:36:15 +00:00

23 lines
634 B
C

--- tests/check_public.c.orig 2011-07-02 20:20:42 UTC
+++ tests/check_public.c
@@ -30,7 +30,10 @@ static void parse_display_pass(const cha
else if(test_type == TEST_ENVIRONMENT)
{
argument = 0;
- setenv("DISPLAY", name, 1);
+ if(name == NULL)
+ unsetenv("DISPLAY");
+ else
+ setenv("DISPLAY", name, 1);
}
got_host = (char *) -1;
@@ -150,7 +153,7 @@ END_TEST
START_TEST(parse_display_negative)
{
- parse_display_fail(0);
+ parse_display_fail(NULL); /* modified by Ashish Shukla. 0 is not NULL in ISO C but in ISO C++ */
parse_display_fail("");
parse_display_fail(":");
parse_display_fail("::");