pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/capstone capstone: fix build on SunOS



details:   https://anonhg.NetBSD.org/pkgsrc/rev/80ba535923af
branches:  trunk
changeset: 375781:80ba535923af
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Mar 26 19:25:51 2022 +0000

description:
capstone: fix build on SunOS

diffstat:

 devel/capstone/distinfo                             |   4 +++-
 devel/capstone/patches/patch-cstool_getopt.h        |  15 +++++++++++++++
 devel/capstone/patches/patch-suite_fuzz_driverbin.c |  18 ++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletions(-)

diffs (56 lines):

diff -r 716724dff3e9 -r 80ba535923af devel/capstone/distinfo
--- a/devel/capstone/distinfo   Sat Mar 26 19:25:19 2022 +0000
+++ b/devel/capstone/distinfo   Sat Mar 26 19:25:51 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2021/12/07 16:34:44 jperkin Exp $
+$NetBSD: distinfo,v 1.17 2022/03/26 19:25:51 tnn Exp $
 
 BLAKE2s (capstone-4.0.2.tar.gz) = d3767b622f0a91b3f38a24817097975ecbf4126b3118b6059dfa4a8b12d01f61
 SHA512 (capstone-4.0.2.tar.gz) = 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e
@@ -7,3 +7,5 @@
 SHA1 (patch-bindings_python_capstone_____init____.py) = ea410a99d4cd4ee0a109a7225b739971472c387d
 SHA1 (patch-bindings_python_setup.py) = aebe4104ece594a7432961dd07c5d739da70f963
 SHA1 (patch-cstool_Makefile) = 68dd0a175d0e2270e2813f784cae5ca9f89a3a05
+SHA1 (patch-cstool_getopt.h) = 662a70f1718654935ae0bfa32e79fc7fe3ef7fcb
+SHA1 (patch-suite_fuzz_driverbin.c) = c7ddd8ea65d8aea357ba086d6a57e0412fa2c193
diff -r 716724dff3e9 -r 80ba535923af devel/capstone/patches/patch-cstool_getopt.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/capstone/patches/patch-cstool_getopt.h      Sat Mar 26 19:25:51 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-cstool_getopt.h,v 1.1 2022/03/26 19:25:51 tnn Exp $
+
+Use the standard optarg prototype.
+
+--- cstool/getopt.h.orig       2020-05-08 10:03:30.000000000 +0000
++++ cstool/getopt.h
+@@ -6,7 +6,7 @@ int opterr = 1, /* if error message shou
+ optind = 1, /* index into parent argv vector */
+ optopt, /* character checked for validity */
+ optreset; /* reset getopt */
+-const char *optarg; /* argument associated with option */
++extern char *optarg; /* argument associated with option */
+ 
+ #define BADCH (int)'?'
+ #define BADARG (int)':'
diff -r 716724dff3e9 -r 80ba535923af devel/capstone/patches/patch-suite_fuzz_driverbin.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/capstone/patches/patch-suite_fuzz_driverbin.c       Sat Mar 26 19:25:51 2022 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-suite_fuzz_driverbin.c,v 1.1 2022/03/26 19:25:51 tnn Exp $
+
+no d_type / DT_REG on SunOS, skip check.
+
+--- suite/fuzz/driverbin.c.orig        2020-05-08 10:03:30.000000000 +0000
++++ suite/fuzz/driverbin.c
+@@ -34,9 +34,11 @@ int main(int argc, char** argv)
+ 
+     while((dir = readdir(d)) != NULL) {
+         //opens the file, get its size, and reads it into a buffer
++#ifdef DT_REG
+         if (dir->d_type != DT_REG) {
+             continue;
+         }
++#endif
+ 
+         printf("Running %s\n", dir->d_name);
+         fflush(stdout);



Home | Main Index | Thread Index | Old Index