summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-09-09 09:30:02 -0400
committerColin Walters <walters@verbum.org>2014-09-09 09:30:02 -0400
commit34c336c1f3ad98918bb044533a43985413d05734 (patch)
tree3753a8a8c74ccd0c5ed2cf62c66f3506fbd5a25a
parentb18e19f9e41a06e2acb3b9689e0248faadedc2ba (diff)
downloadostree-34c336c1f3ad98918bb044533a43985413d05734.tar.gz
Work around deprecation of SoupServer's port property
See https://bugzilla.gnome.org/show_bug.cgi?id=732184
-rw-r--r--Makefile.am2
-rw-r--r--src/ostree/ot-builtin-trivial-httpd.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 614413ca..34381ec3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
-DGPGVPATH=\"$(GPGVPATH)\" \
-DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' \
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36 \
- -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_40
+ -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_48
AM_CFLAGS += $(WARN_CFLAGS)
DISTCHECK_CONFIGURE_FLAGS += --enable-gtk-doc --disable-maintainer-mode
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c
index 4cfc4b47..727ff30f 100644
--- a/src/ostree/ot-builtin-trivial-httpd.c
+++ b/src/ostree/ot-builtin-trivial-httpd.c
@@ -345,9 +345,15 @@ ostree_builtin_trivial_httpd (int argc, char **argv, OstreeRepo *repo, GCancella
app->root = g_file_new_for_path (dirpath);
+#if SOUP_CHECK_VERSION(2, 48, 0)
+ server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "ostree-httpd ", NULL);
+ soup_server_listen (server, NULL, 0);
+#else
server = soup_server_new (SOUP_SERVER_PORT, 0,
SOUP_SERVER_SERVER_HEADER, "ostree-httpd ",
NULL);
+#endif
+
soup_server_add_handler (server, NULL, httpd_callback, app, NULL);
if (opt_port_file)
{