pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/fatback Fix build on SunOS



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d817a5d5614
branches:  trunk
changeset: 644881:0d817a5d5614
user:      wiedi <wiedi%pkgsrc.org@localhost>
date:      Sun Jan 18 19:53:27 2015 +0000

description:
Fix build on SunOS
Needs correct integer types, __EXTENSIONS__
include netdb.h for MAXHOSTNAMELEN
and a patch to ensure NAME_MAX is defined

diffstat:

 sysutils/fatback/Makefile                |   4 +++-
 sysutils/fatback/distinfo                |   5 +++--
 sysutils/fatback/patches/patch-aa        |  16 +++++++++++++---
 sysutils/fatback/patches/patch-cmd__cp.c |  17 +++++++++++++++++
 4 files changed, 36 insertions(+), 6 deletions(-)

diffs (88 lines):

diff -r 85a2d0ab0c78 -r 0d817a5d5614 sysutils/fatback/Makefile
--- a/sysutils/fatback/Makefile Sun Jan 18 19:00:32 2015 +0000
+++ b/sysutils/fatback/Makefile Sun Jan 18 19:53:27 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2013/04/06 20:27:28 rodent Exp $
+# $NetBSD: Makefile,v 1.11 2015/01/18 19:53:27 wiedi Exp $
 
 DISTNAME=      fatback-1.3
 PKGREVISION=   1
@@ -15,4 +15,6 @@
 USE_LANGUAGES= c c++
 USE_TOOLS+=    lex
 
+CPPFLAGS.SunOS+=       -Du_int8_t=uint8_t -Du_int16_t=uint16_t -D__EXTENSIONS__
+
 .include "../../mk/bsd.pkg.mk"
diff -r 85a2d0ab0c78 -r 0d817a5d5614 sysutils/fatback/distinfo
--- a/sysutils/fatback/distinfo Sun Jan 18 19:00:32 2015 +0000
+++ b/sysutils/fatback/distinfo Sun Jan 18 19:53:27 2015 +0000
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.3 2012/04/17 17:47:54 joerg Exp $
+$NetBSD: distinfo,v 1.4 2015/01/18 19:53:27 wiedi Exp $
 
 SHA1 (fatback-1.3.tar.gz) = 0c17a76f64b359ee67ea308e58b668c14c77c699
 RMD160 (fatback-1.3.tar.gz) = 4a8b29f00e51ea4856e41e94c30dca3e96712a40
 Size (fatback-1.3.tar.gz) = 190800 bytes
-SHA1 (patch-aa) = e8c130c4f514fa61966541eb30016af3e299082c
+SHA1 (patch-aa) = 07279c8918f127047c1c965d2b48b9f69d81ce83
 SHA1 (patch-ab) = 36fb419f55817375437e2548e6c99cb5b70bf0c5
 SHA1 (patch-ac) = f844b30f09716c64347ec500210e17e8431bec7d
 SHA1 (patch-ad) = 3f0960a7347e8d5c2d6f99849a04133056b36feb
 SHA1 (patch-ae) = 6419bde4bc1e04e8dcace69d515a366d693f9676
 SHA1 (patch-af) = f522a1257bdf274983c93147e6b8f293e509d41d
+SHA1 (patch-cmd__cp.c) = 1a6a3a79aac0c03e245aff11f583d7076d4a5cc2
diff -r 85a2d0ab0c78 -r 0d817a5d5614 sysutils/fatback/patches/patch-aa
--- a/sysutils/fatback/patches/patch-aa Sun Jan 18 19:00:32 2015 +0000
+++ b/sysutils/fatback/patches/patch-aa Sun Jan 18 19:53:27 2015 +0000
@@ -1,8 +1,18 @@
-$NetBSD: patch-aa,v 1.2 2012/04/17 17:47:54 joerg Exp $
+$NetBSD: patch-aa,v 1.3 2015/01/18 19:53:27 wiedi Exp $
 
 --- output.c.orig      2001-05-30 15:47:04.000000000 +0000
 +++ output.c
-@@ -54,7 +54,7 @@ int display(displaylevel_t level, char *
+@@ -9,6 +9,9 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include <limits.h>
++#if defined(__sun)
++#include <netdb.h>
++#endif
+ #include <sys/param.h>
+ #include <sys/utsname.h>
+ #include <stdlib.h>
+@@ -54,7 +57,7 @@ int display(displaylevel_t level, char *
       /* get the verbosity level from the fatback symbol table */
       if (!(verbose_var = get_fbvar("verbose"))) {
            printf("Error reading variable\n");
@@ -11,7 +21,7 @@
       } else {
            verbose = verbose_var->val.ival;
            free(verbose_var);
-@@ -63,9 +63,12 @@ int display(displaylevel_t level, char *
+@@ -63,9 +66,12 @@ int display(displaylevel_t level, char *
       /* print the rest of the arguments in standard printf style */
       va_start(arg_list, format);
       retval = vfprintf(Audit_log, format, arg_list);
diff -r 85a2d0ab0c78 -r 0d817a5d5614 sysutils/fatback/patches/patch-cmd__cp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/fatback/patches/patch-cmd__cp.c  Sun Jan 18 19:53:27 2015 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-cmd__cp.c,v 1.1 2015/01/18 19:53:27 wiedi Exp $
+
+Make sure NAME_MAX is defined.
+Anything not too small should be ok, only used in a sanity check.
+--- cmd_cp.c.orig      2001-05-30 15:40:00.000000000 +0000
++++ cmd_cp.c
+@@ -14,6 +14,10 @@
+ #include "recovery.h"
+ #include "output.h"
+ 
++#ifndef NAME_MAX
++#define NAME_MAX 255
++#endif
++
+ static struct option long_opts[] =
+ {
+      {"deleted", 0, 0, 'd'},



Home | Main Index | Thread Index | Old Index