- do not define test_data before system header inclusion, libgcrypt

uses this as argument parameters. (libmicrohttpd_test_data.patch)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmicrohttpd?expand=0&rev=36
This commit is contained in:
Marcus Meissner 2014-05-08 14:01:03 +00:00 committed by Git OBS Bridge
parent c787cf0096
commit d67918b9e4
3 changed files with 97 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 8 14:00:36 UTC 2014 - meissner@suse.com
- do not define test_data before system header inclusion, libgcrypt
uses this as argument parameters. (libmicrohttpd_test_data.patch)
-------------------------------------------------------------------
Mon Apr 28 07:23:50 UTC 2014 - coolo@suse.com

View File

@ -34,6 +34,7 @@ Patch0: libmicrohttpd-0.9.34-spdy-pc.patch
# PATCH-WORKAROUND-OPENSUSE: the threads have a problem deadlocking (in OBS)
Patch1: disable-stalling-test.patch
# Autotools only due to above patch
Patch2: libmicrohttpd_test_data.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libcurl-devel
@ -123,6 +124,7 @@ localhost.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
autoreconf -vi
%build

View File

@ -0,0 +1,89 @@
Index: libmicrohttpd-0.9.34/src/testcurl/https/test_https_sni.c
===================================================================
--- libmicrohttpd-0.9.34.orig/src/testcurl/https/test_https_sni.c
+++ libmicrohttpd-0.9.34/src/testcurl/https/test_https_sni.c
@@ -186,7 +186,7 @@ do_get (const char *url)
size_t len;
struct curl_slist *dns_info;
- len = strlen (test_data);
+ len = strlen (microhttpd_test_data);
if (NULL == (cbc.buf = malloc (sizeof (char) * len)))
{
fprintf (stderr, MHD_E_MEM);
@@ -231,7 +231,7 @@ do_get (const char *url)
curl_easy_cleanup (c);
curl_slist_free_all (dns_info);
- if (memcmp (cbc.buf, test_data, len) != 0)
+ if (memcmp (cbc.buf, microhttpd_test_data, len) != 0)
{
fprintf (stderr, "Error: local file & received file differ.\n");
free (cbc.buf);
Index: libmicrohttpd-0.9.34/src/testcurl/https/tls_test_common.c
===================================================================
--- libmicrohttpd-0.9.34.orig/src/testcurl/https/tls_test_common.c
+++ libmicrohttpd-0.9.34/src/testcurl/https/tls_test_common.c
@@ -74,7 +74,7 @@ test_daemon_get (void *cls,
char url[255];
size_t len;
- len = strlen (test_data);
+ len = strlen (microhttpd_test_data);
if (NULL == (cbc.buf = malloc (sizeof (char) * len)))
{
fprintf (stderr, MHD_E_MEM);
@@ -123,7 +123,7 @@ test_daemon_get (void *cls,
curl_easy_cleanup (c);
- if (memcmp (cbc.buf, test_data, len) != 0)
+ if (memcmp (cbc.buf, microhttpd_test_data, len) != 0)
{
fprintf (stderr, "Error: local file & received file differ.\n");
free (cbc.buf);
@@ -179,8 +179,8 @@ http_ahc (void *cls, struct MHD_Connecti
return MHD_YES;
}
*ptr = NULL; /* reset when done */
- response = MHD_create_response_from_buffer (strlen (test_data),
- (void *) test_data,
+ response = MHD_create_response_from_buffer (strlen (microhttpd_test_data),
+ (void *) microhttpd_test_data,
MHD_RESPMEM_PERSISTENT);
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);
@@ -320,7 +320,7 @@ test_https_transfer (void *cls, const ch
struct CBC cbc;
char url[255];
- len = strlen (test_data);
+ len = strlen (microhttpd_test_data);
if (NULL == (cbc.buf = malloc (sizeof (char) * len)))
{
fprintf (stderr, MHD_E_MEM);
@@ -342,9 +342,9 @@ test_https_transfer (void *cls, const ch
}
/* compare test file & daemon responce */
- if ( (len != strlen (test_data)) ||
+ if ( (len != strlen (microhttpd_test_data)) ||
(memcmp (cbc.buf,
- test_data,
+ microhttpd_test_data,
len) != 0) )
{
fprintf (stderr, "Error: local file & received file differ.\n");
Index: libmicrohttpd-0.9.34/src/testcurl/https/tls_test_common.h
===================================================================
--- libmicrohttpd-0.9.34.orig/src/testcurl/https/tls_test_common.h
+++ libmicrohttpd-0.9.34/src/testcurl/https/tls_test_common.h
@@ -34,7 +34,7 @@
#define DEAMON_TEST_PORT 4233
-#define test_data "Hello World\n"
+#define microhttpd_test_data "Hello World\n"
#define ca_cert_file_name "tmp_ca_cert.pem"
#define EMPTY_PAGE "<html><head><title>Empty page</title></head><body>Empty page</body></html>"