forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libdbiDrivers: fix compile errors in tests, backport patches
- Loading branch information
Showing
4 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
pkgs/by-name/li/libdbiDrivers/libdbi-drivers-0.9.0-470b58e15-wait-include.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
commit 470b58e15dc6f406899b1695aec7fc98986b8f14 | ||
Author: Jan Engelhardt <jengelh@inai.de> | ||
Date: Fri Jan 27 09:56:44 2017 +0100 | ||
|
||
build: resolve compiler warning for wait(2) | ||
|
||
src/unit.c: In function "wait_for_child_process": | ||
src/unit.c:229:5: warning: implicit declaration of function "wait" [-Wimplicit-function-declaration] | ||
wait(&status); | ||
|
||
diff --git a/tests/cgreen/src/unit.c b/tests/cgreen/src/unit.c | ||
index 7753ff1..bdd236f 100644 | ||
--- a/tests/cgreen/src/unit.c | ||
+++ b/tests/cgreen/src/unit.c | ||
@@ -9,6 +9,7 @@ | ||
#include <stdarg.h> | ||
#include <unistd.h> | ||
#include <signal.h> | ||
+#include <sys/wait.h> | ||
|
||
enum {test_function, test_suite}; | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
pkgs/by-name/li/libdbiDrivers/libdbi-drivers-0.9.0-9f378826-compare-type.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
commit 9f3788269befd2e4290eef1df4b014bc2385d801 | ||
Author: Jan Engelhardt <jengelh@inai.de> | ||
Date: Sat Sep 7 22:51:05 2013 +0200 | ||
|
||
build: resolve rpmlint aborting due to bad code | ||
|
||
diff --git a/tests/cgreen/src/constraint.c b/tests/cgreen/src/constraint.c | ||
index c19c0dd..b0fbfb8 100644 | ||
--- a/tests/cgreen/src/constraint.c | ||
+++ b/tests/cgreen/src/constraint.c | ||
@@ -164,8 +164,8 @@ static void test_want_double(Constraint *constraint, const char *function, intpt | ||
} | ||
|
||
static int compare_using_matcher(Constraint *constraint, intptr_t actual) { | ||
- int (*matches)(const void*) = constraint->expected; | ||
- return matches(actual); | ||
+ int (*matches)(const void*) = (void *)(intptr_t)constraint->expected; | ||
+ return matches((void *)actual); | ||
} | ||
|
||
static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) { | ||
|
32 changes: 32 additions & 0 deletions
32
pkgs/by-name/li/libdbiDrivers/libdbi-drivers-0.9.0-function-types.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/tests/cgreen/src/constraint.c b/tests/cgreen/src/constraint.c | ||
index 56c3625..d8972bb 100644 | ||
--- a/tests/cgreen/src/constraint.c | ||
+++ b/tests/cgreen/src/constraint.c | ||
@@ -22,7 +22,7 @@ static double unbox_double(intptr_t box); | ||
static double as_double(intptr_t box); | ||
|
||
static int compare_using_matcher(Constraint *constraint, intptr_t actual); | ||
-static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t actual, const char *test_file, int test_line, TestReporter *reporter); | ||
+static void test_with_matcher(Constraint *constraint, const char *function, intptr_t actual, const char *test_file, int test_line, TestReporter *reporter); | ||
|
||
|
||
void destroy_constraint(void *abstract) { | ||
@@ -168,15 +168,14 @@ static int compare_using_matcher(Constraint *constraint, intptr_t actual) { | ||
return matches((void *)actual); | ||
} | ||
|
||
-static void test_with_matcher(Constraint *constraint, const char *function, const char* matcher_name, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) { | ||
+static void test_with_matcher(Constraint *constraint, const char *function, intptr_t matcher_function, const char *test_file, int test_line, TestReporter *reporter) { | ||
(*reporter->assert_true)( | ||
reporter, | ||
test_file, | ||
test_line, | ||
(*constraint->compare)(constraint, matcher_function), | ||
- "Wanted parameter [%s] to match [%s] in function [%s]", | ||
+ "Wanted parameter [%s] to match [nil] in function [%s]", | ||
constraint->parameter, | ||
- matcher_name, | ||
function); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters