From 0dd0a601043c24d2ca482745677bf34ea8b40ae1 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 29 May 2012 20:18:28 +0000 Subject: Fix build with Clang. --- net/libsoup24/distinfo | 3 +- net/libsoup24/patches/patch-tests_coding-test.c | 38 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 net/libsoup24/patches/patch-tests_coding-test.c (limited to 'net') diff --git a/net/libsoup24/distinfo b/net/libsoup24/distinfo index 56a3ff43973..d316c3957f9 100644 --- a/net/libsoup24/distinfo +++ b/net/libsoup24/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.27 2012/04/30 14:22:36 drochner Exp $ +$NetBSD: distinfo,v 1.28 2012/05/29 20:21:53 joerg Exp $ SHA1 (libsoup-2.38.1.tar.xz) = 8418440ff59917dee2e5618965cf8683b61258bf RMD160 (libsoup-2.38.1.tar.xz) = 6603131f0c1e84225f7b508a18927e3733910ddc Size (libsoup-2.38.1.tar.xz) = 620832 bytes +SHA1 (patch-tests_coding-test.c) = 2b76cf778cf389d9c67abb2b5222656e7e4191fb diff --git a/net/libsoup24/patches/patch-tests_coding-test.c b/net/libsoup24/patches/patch-tests_coding-test.c new file mode 100644 index 00000000000..ba9bcfe9d92 --- /dev/null +++ b/net/libsoup24/patches/patch-tests_coding-test.c @@ -0,0 +1,38 @@ +$NetBSD: patch-tests_coding-test.c,v 1.1 2012/05/29 20:21:53 joerg Exp $ + +--- tests/coding-test.c.orig 2012-05-05 16:22:51.000000000 +0000 ++++ tests/coding-test.c +@@ -46,7 +46,7 @@ server_callback (SoupServer *server, Sou + + if (codings) { + gboolean claim_deflate, claim_gzip; +- const char *file_path = NULL, *encoding = NULL; ++ const char *encoding = NULL, *suffix; + + claim_deflate = g_slist_find_custom (codings, "deflate", (GCompareFunc)g_ascii_strcasecmp) != NULL; + claim_gzip = g_slist_find_custom (codings, "gzip", (GCompareFunc)g_ascii_strcasecmp) != NULL; +@@ -54,19 +54,19 @@ server_callback (SoupServer *server, Sou + if (claim_gzip && (!claim_deflate || + (!soup_header_contains (options, "prefer-deflate-zlib") && + !soup_header_contains (options, "prefer-deflate-raw")))) { +- file_path = SRCDIR "/resources%s.gz"; ++ suffix = ".gz"; + encoding = "gzip"; + } else if (claim_deflate) { + if (soup_header_contains (options, "prefer-deflate-raw")) { +- file_path = SRCDIR "/resources%s.raw"; ++ suffix = ".raw"; + encoding = "deflate"; + } else { +- file_path = SRCDIR "/resources%s.zlib"; ++ suffix = ".zlib"; + encoding = "deflate"; + } + } +- if (file_path && encoding) { +- file = g_strdup_printf (file_path, path); ++ if (encoding) { ++ file = g_strdup_printf (SRCDIR "/resources%s%s", path, suffix); + if (g_file_test (file, G_FILE_TEST_EXISTS)) { + soup_message_headers_append (msg->response_headers, + "Content-Encoding", -- cgit v1.2.3