summaryrefslogtreecommitdiff
path: root/net/gift
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2017-12-26 11:27:39 +0000
committerhe <he@pkgsrc.org>2017-12-26 11:27:39 +0000
commit7989faf2b6864d4aaeeb96d6daa27004b1d35110 (patch)
tree5e7df9261274496181ce5f35cc278de306b793fe /net/gift
parent1ae8ceb49182df7c2d169cedf405d40325efebc8 (diff)
downloadpkgsrc-7989faf2b6864d4aaeeb96d6daa27004b1d35110.tar.gz
Add a couple of patches:
* Quiet type conversion warnings by adding const to one of the logging functions * Don't confuse the C preprocessor by converting one arg into two. Fixes build on NetBSD/8.0 with SSP. Bump PKGREVISION.
Diffstat (limited to 'net/gift')
-rw-r--r--net/gift/Makefile4
-rw-r--r--net/gift/distinfo5
-rw-r--r--net/gift/patches/patch-lib_log.c15
-rw-r--r--net/gift/patches/patch-lib_log.h15
-rw-r--r--net/gift/patches/patch-src_plugin.c29
5 files changed, 65 insertions, 3 deletions
diff --git a/net/gift/Makefile b/net/gift/Makefile
index f7307f77ef0..7c9599ea78c 100644
--- a/net/gift/Makefile
+++ b/net/gift/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.22 2016/07/09 06:38:41 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2017/12/26 11:27:39 he Exp $
#
DISTNAME= gift-0.11.8.1
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gift/}
EXTRACT_SUFX= .tar.bz2
diff --git a/net/gift/distinfo b/net/gift/distinfo
index 376f6c835cb..e12c0f338c5 100644
--- a/net/gift/distinfo
+++ b/net/gift/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.4 2015/11/04 00:35:01 agc Exp $
+$NetBSD: distinfo,v 1.5 2017/12/26 11:27:39 he Exp $
SHA1 (gift-0.11.8.1.tar.bz2) = eda16a9abead7552859679696605f7e7350b0bb2
RMD160 (gift-0.11.8.1.tar.bz2) = cef5fe571eff21a61219ce40501652c7b1997a02
SHA512 (gift-0.11.8.1.tar.bz2) = 5c1e47d3cd77a7331321c7f94486636bb8b6ec69e51e707fbf7706c45f645b8c0831b191ef24da70a850a75a53a4d71d03739dbba7da3e3e34a402cba02aaac8
Size (gift-0.11.8.1.tar.bz2) = 541446 bytes
+SHA1 (patch-lib_log.c) = c691394e82aa66b83efb727bf9f976e0d811a303
+SHA1 (patch-lib_log.h) = c879d3a381c1fd81cdaadb77b2a268eb80416493
+SHA1 (patch-src_plugin.c) = 37e67f54ace7bfa69e599b0a2720c8572c854204
diff --git a/net/gift/patches/patch-lib_log.c b/net/gift/patches/patch-lib_log.c
new file mode 100644
index 00000000000..7ec37755492
--- /dev/null
+++ b/net/gift/patches/patch-lib_log.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_log.c,v 1.1 2017/12/26 11:27:39 he Exp $
+
+Constify, to quiet type conversion warnings.
+
+--- lib/log.c.orig 2004-01-15 14:02:11.000000000 +0000
++++ lib/log.c
+@@ -237,7 +237,7 @@ void log_debug (const char *fmt, ...)
+ log_print (LOG_DEBUG, buf);
+ }
+
+-void log_trace_pfx (char *pfx, char *file, int line, char *func, char *extra)
++void log_trace_pfx (const char *pfx, const char *file, int line, const char *func, const char *extra)
+ {
+ free (trace_pfx);
+ trace_pfx = STRDUP (pfx);
diff --git a/net/gift/patches/patch-lib_log.h b/net/gift/patches/patch-lib_log.h
new file mode 100644
index 00000000000..0825204ce95
--- /dev/null
+++ b/net/gift/patches/patch-lib_log.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_log.h,v 1.1 2017/12/26 11:27:39 he Exp $
+
+Constify, to quiet type conversion warnings.
+
+--- lib/log.h.orig 2003-12-23 04:22:53.000000000 +0000
++++ lib/log.h
+@@ -194,7 +194,7 @@ LIBGIFT_EXPORT
+ LIBGIFT_EXPORT
+ void log_debug (const char *fmt, ...) GIFT_FMTATTR (1, 2);
+ LIBGIFT_EXPORT
+- void log_trace_pfx (char *pfx, char *file, int line, char *func, char *extra);
++ void log_trace_pfx (const char *pfx, const char *file, int line, const char *func, const char *extra);
+ LIBGIFT_EXPORT
+ void log_trace (const char *fmt, ...) GIFT_FMTATTR (1, 2);
+
diff --git a/net/gift/patches/patch-src_plugin.c b/net/gift/patches/patch-src_plugin.c
new file mode 100644
index 00000000000..5417a780484
--- /dev/null
+++ b/net/gift/patches/patch-src_plugin.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_plugin.c,v 1.1 2017/12/26 11:27:39 he Exp $
+
+Don't confuse the C preprocessor by supplying what looks
+like a single argument into two arguments. (Confuses SSP macros.)
+
+--- src/plugin.c.orig 2004-11-12 02:52:16.000000000 +0000
++++ src/plugin.c
+@@ -123,16 +123,18 @@ static void *dummy_voidptr_null (/*< voi
+ * This is just terrible. Please make me fix this.
+ */
+ #define APPENDMSG msg + msgwr, sizeof (msg) - msgwr - 1
++#define MSGPTR msg + msgwr
++#define REMAIN sizeof(msg) - msgwr - 1
+ #define LOGMSG(fmt,pfx1,pfx2) \
+ char msg[4096]; \
+ size_t msgwr = 0; \
+ va_list args; \
+ if (pfx1) \
+- msgwr += snprintf (APPENDMSG, "%s: ", STRING_NOTNULL(pfx1)); \
++ msgwr += snprintf (MSGPTR, REMAIN, "%s: ", STRING_NOTNULL(pfx1)); \
+ if (pfx2) \
+- msgwr += snprintf (APPENDMSG, "[%s]: ", STRING_NOTNULL(pfx2)); \
++ msgwr += snprintf (MSGPTR, REMAIN, "[%s]: ", STRING_NOTNULL(pfx2)); \
+ va_start (args, fmt); \
+- vsnprintf (APPENDMSG, fmt, args); \
++ vsnprintf (MSGPTR, REMAIN, fmt, args); \
+ va_end (args);
+
+ static int wrapper_dbg (Protocol *p, char *fmt, ...)