[arch-commits] Commit in pacredir/trunk (2 files)

Christian Hesse eworm at archlinux.org
Tue Jul 7 10:04:37 UTC 2020


    Date: Tuesday, July 7, 2020 @ 10:04:36
  Author: eworm
Revision: 658107

fix build with libmicrohttpd 0.9.71

Added:
  pacredir/trunk/0001-fix-build-with-libmicrohttpd-0.9.71.patch
Modified:
  pacredir/trunk/PKGBUILD

------------------------------------------------+
 0001-fix-build-with-libmicrohttpd-0.9.71.patch |   51 +++++++++++++++++++++++
 PKGBUILD                                       |   12 ++++-
 2 files changed, 61 insertions(+), 2 deletions(-)

Added: 0001-fix-build-with-libmicrohttpd-0.9.71.patch
===================================================================
--- 0001-fix-build-with-libmicrohttpd-0.9.71.patch	                        (rev 0)
+++ 0001-fix-build-with-libmicrohttpd-0.9.71.patch	2020-07-07 10:04:36 UTC (rev 658107)
@@ -0,0 +1,51 @@
+From f5482d8c6463c310a2b1bbab3ab3776155e16f93 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Tue, 7 Jul 2020 11:29:36 +0200
+Subject: [PATCH 1/1] fix build with libmicrohttpd 0.9.71
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ pacredir.c | 2 +-
+ pacredir.h | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/pacredir.c b/pacredir.c
+index 1f16804..2fa806f 100644
+--- a/pacredir.c
++++ b/pacredir.c
+@@ -343,7 +343,7 @@ static void * get_http_code(void * data) {
+ 
+ /*** ahc_echo ***
+  * called whenever a http request is received */
+-static int ahc_echo(void * cls,
++static mhd_result ahc_echo(void * cls,
+ 		struct MHD_Connection * connection,
+ 		const char * uri,
+ 		const char * method,
+diff --git a/pacredir.h b/pacredir.h
+index d165ee8..a38eb9f 100644
+--- a/pacredir.h
++++ b/pacredir.h
+@@ -44,6 +44,13 @@
+ 
+ #define PROGNAME	"pacredir"
+ 
++/* libmicrohttpd compat */
++#if MHD_VERSION >= 0x00097002
++#  define mhd_result enum MHD_Result
++#else
++#  define mhd_result int
++#endif
++
+ /* hosts */
+ struct hosts {
+ 	/* host name */
+@@ -130,7 +137,7 @@ static void client_callback(AvahiClient *c,
+ /* get_http_code */
+ static void * get_http_code(void * data);
+ /* ahc_echo */
+-static int ahc_echo(void * cls,
++static mhd_result ahc_echo(void * cls,
+ 		struct MHD_Connection * connection,
+ 		const char * uri,
+ 		const char * method,

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-07 09:59:05 UTC (rev 658106)
+++ PKGBUILD	2020-07-07 10:04:36 UTC (rev 658107)
@@ -13,10 +13,18 @@
 install=pacredir.install
 backup=('etc/pacredir.conf' 'etc/pacman.d/pacredir')
 validpgpkeys=('BD84DE71F493DF6814B0167254EDC91609BC9183') # Christian Hesse <mail at eworm.de>
-source=("https://www.eworm.de/download/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.asc})
+source=("https://www.eworm.de/download/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.asc}
+        '0001-fix-build-with-libmicrohttpd-0.9.71.patch')
 sha256sums=('e2fb8478cfbca7322bb95f146d0fdb64017306f44af22c29651c05e0103dd0da'
-            'SKIP')
+            'SKIP'
+            '0d82ebeb5d4520290e0490dc1a71e503d2a8ad36adfe0a8cebf5c5b851676aea')
 
+prepare() {
+	cd ${pkgname}-${pkgver}/
+
+	patch -Np1 < ../0001-fix-build-with-libmicrohttpd-0.9.71.patch
+}
+
 build() {
 	cd ${pkgname}-${pkgver}/
 



More information about the arch-commits mailing list