pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/nnn sysutils/nnn: Supply dprintf() on Solaris...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/01305230a12d
branches:  trunk
changeset: 459036:01305230a12d
user:      sjmulder <sjmulder%pkgsrc.org@localhost>
date:      Tue Sep 28 23:31:04 2021 +0000

description:
sysutils/nnn: Supply dprintf() on Solaris to fix build

diffstat:

 sysutils/nnn/distinfo                |   3 +-
 sysutils/nnn/patches/patch-src_nnn.c |  43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletions(-)

diffs (59 lines):

diff -r e57782b1e9cf -r 01305230a12d sysutils/nnn/distinfo
--- a/sysutils/nnn/distinfo     Tue Sep 28 22:20:21 2021 +0000
+++ b/sysutils/nnn/distinfo     Tue Sep 28 23:31:04 2021 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.20 2021/07/26 20:11:50 fcambus Exp $
+$NetBSD: distinfo,v 1.21 2021/09/28 23:31:04 sjmulder Exp $
 
 SHA1 (nnn-4.2.tar.gz) = 53d3bc842e10f3bff87ee44f5fcc2347f22ed311
 RMD160 (nnn-4.2.tar.gz) = a7c91f4aa7d73e5e275d2f0b4611cada613af2cb
 SHA512 (nnn-4.2.tar.gz) = 4d3ee102ad4d0067b40aec5e3b68fcd802ed4c5a9586b1e4cc81ea3525dd4190561887b0db4a1385adff699a095c9cf6de56a96e031db97f93e5bc7209422cd3
 Size (nnn-4.2.tar.gz) = 229745 bytes
+SHA1 (patch-src_nnn.c) = e7ea87e3584f3d19385df434a98868ac2e008e6a
diff -r e57782b1e9cf -r 01305230a12d sysutils/nnn/patches/patch-src_nnn.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/nnn/patches/patch-src_nnn.c      Tue Sep 28 23:31:04 2021 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-src_nnn.c,v 1.4 2021/09/28 23:31:04 sjmulder Exp $
+
+dprintf() polyfill for Solaris
+
+--- src/nnn.c.orig     2021-09-28 23:10:13.183444540 +0000
++++ src/nnn.c
+@@ -117,6 +117,10 @@
+ #define alloca(size) __builtin_alloca(size)
+ #endif
+ 
++#ifdef __sun
++#define NEED_DPRINTF
++#endif
++
+ #include "nnn.h"
+ #include "dbg.h"
+ 
+@@ -834,6 +838,25 @@ static void notify_fifo(bool force);
+ 
+ /* Functions */
+ 
++#ifdef NEED_DPRINTF
++static int dprintf(int fd, const char *format, ...)
++{
++      va_list ap;
++      char *s;
++
++      va_start(ap, format);
++      if (vasprintf(&s, format, ap) == -1)
++              { va_end(ap); return -1; }
++      va_end(ap);
++
++      if (write(fd, s, strlen(s)) == -1)
++              { free(s); return -1; }
++
++      free(s);
++      return 0;
++}
++#endif
++
+ static void sigint_handler(int sig)
+ {
+       (void) sig;



Home | Main Index | Thread Index | Old Index