pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/gift Add a couple of patches:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/070994ac2daa
branches:  trunk
changeset: 373049:070994ac2daa
user:      he <he%pkgsrc.org@localhost>
date:      Tue Dec 26 11:27:39 2017 +0000

description:
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:

 net/gift/Makefile                   |   4 ++--
 net/gift/distinfo                   |   5 ++++-
 net/gift/patches/patch-lib_log.c    |  15 +++++++++++++++
 net/gift/patches/patch-lib_log.h    |  15 +++++++++++++++
 net/gift/patches/patch-src_plugin.c |  29 +++++++++++++++++++++++++++++
 5 files changed, 65 insertions(+), 3 deletions(-)

diffs (99 lines):

diff -r 3442bb79bfde -r 070994ac2daa net/gift/Makefile
--- a/net/gift/Makefile Mon Dec 25 22:22:47 2017 +0000
+++ b/net/gift/Makefile Tue Dec 26 11:27:39 2017 +0000
@@ -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 -r 3442bb79bfde -r 070994ac2daa net/gift/distinfo
--- a/net/gift/distinfo Mon Dec 25 22:22:47 2017 +0000
+++ b/net/gift/distinfo Tue Dec 26 11:27:39 2017 +0000
@@ -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 -r 3442bb79bfde -r 070994ac2daa net/gift/patches/patch-lib_log.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/gift/patches/patch-lib_log.c  Tue Dec 26 11:27:39 2017 +0000
@@ -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 -r 3442bb79bfde -r 070994ac2daa net/gift/patches/patch-lib_log.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/gift/patches/patch-lib_log.h  Tue Dec 26 11:27:39 2017 +0000
@@ -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 -r 3442bb79bfde -r 070994ac2daa net/gift/patches/patch-src_plugin.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/gift/patches/patch-src_plugin.c       Tue Dec 26 11:27:39 2017 +0000
@@ -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, ...)



Home | Main Index | Thread Index | Old Index