logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 2f32b84cb259d95193f0eff42dc08b861df1ed68
parent f0b016581c124ebb1cc7e437e7eef5071dbaae8e
Author: Michael Forney <mforney@mforney.org>
Date:   Thu,  4 Jun 2020 21:50:44 -0700

openbsd: Fix a few warnings

Diffstat:

Mpkg/openbsd/gen.lua1+
Mpkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch8++++----
Apkg/openbsd/patch/0034-pax-Fix-some-incorrect-format-specifiers.patch48++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/openbsd/patch/0035-pax-Use-memcpy-to-set-TMAGIC-and-TVERSION-to-avoid-w.patch27+++++++++++++++++++++++++++
Apkg/openbsd/patch/0036-rsync-Fix-some-incorrect-format-specifiers.patch25+++++++++++++++++++++++++
Apkg/openbsd/patch/0037-m4-Declare-dopaste-only-when-it-s-used.patch26++++++++++++++++++++++++++
Mpkg/openbsd/ver2+-
7 files changed, 132 insertions(+), 5 deletions(-)

diff --git a/pkg/openbsd/gen.lua b/pkg/openbsd/gen.lua @@ -1,4 +1,5 @@ cflags{ + '-Wall', '-Wno-pointer-sign', '-Wno-maybe-uninitialized', '-Wno-attributes', [[-D 'DEF_WEAK(n)=_Static_assert(1, "")']], '-I $dir/include', '-idirafter $srcdir/include', diff --git a/pkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch b/pkg/openbsd/patch/0016-doas-Port-to-linux-musl.patch @@ -1,4 +1,4 @@ -From 5dd6a34aacb8c4248823f708f68201ba06ec6c25 Mon Sep 17 00:00:00 2001 +From c95443d87b64650823e41016c26b1f5a3b38e7b3 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 26 Feb 2017 16:50:55 -0800 Subject: [PATCH] doas: Port to linux/musl @@ -293,7 +293,7 @@ index dd9466e5f13..d1f698c7679 100644 #include <stdio.h> diff --git a/usr.bin/doas/persist.c b/usr.bin/doas/persist.c new file mode 100644 -index 00000000000..41fa747458b +index 00000000000..4ad1bf1efbf --- /dev/null +++ b/usr.bin/doas/persist.c @@ -0,0 +1,133 @@ @@ -401,7 +401,7 @@ index 00000000000..41fa747458b + *valid = clock_gettime(CLOCK_BOOTTIME, &ts) == 0 && + fstat(fd, &st) == 0 && + (ts.tv_sec < st.st_mtim.tv_sec || -+ ts.tv_sec == st.st_mtim.tv_sec && ts.tv_nsec < st.st_mtim.tv_nsec) && ++ (ts.tv_sec == st.st_mtim.tv_sec && ts.tv_nsec < st.st_mtim.tv_nsec)) && + st.st_mtime - ts.tv_sec <= PERSIST_TIMEOUT; + } + return fd; @@ -431,5 +431,5 @@ index 00000000000..41fa747458b + return 0; +} -- -2.26.2 +2.27.0 diff --git a/pkg/openbsd/patch/0034-pax-Fix-some-incorrect-format-specifiers.patch b/pkg/openbsd/patch/0034-pax-Fix-some-incorrect-format-specifiers.patch @@ -0,0 +1,48 @@ +From f855b534ca2c34c3691a0c89d1be482a33a3610c Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 4 Jun 2020 21:36:11 -0700 +Subject: [PATCH] pax: Fix some incorrect format specifiers + +--- + bin/pax/cpio.c | 2 +- + bin/pax/gen_subs.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c +index 3832b1e87aa..769a9dfb990 100644 +--- a/bin/pax/cpio.c ++++ b/bin/pax/cpio.c +@@ -214,7 +214,7 @@ rd_ln_nm(ARCHD *arcn) + */ + if ((arcn->sb.st_size <= 0) || + (arcn->sb.st_size >= (off_t)sizeof(arcn->ln_name))) { +- paxwarn(1, "Cpio link name length is invalid: %lld", ++ paxwarn(1, "Cpio link name length is invalid: %zu", + arcn->sb.st_size); + return(-1); + } +diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c +index 405dd2c24ed..7eb82007e3b 100644 +--- a/bin/pax/gen_subs.c ++++ b/bin/pax/gen_subs.c +@@ -109,7 +109,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp) + if (strftime(f_date, sizeof(f_date), TIMEFMT(sbp->st_mtime, now), + localtime(&(sbp->st_mtime))) == 0) + f_date[0] = '\0'; +- (void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, sbp->st_nlink, ++ (void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, (unsigned)sbp->st_nlink, + NAME_WIDTH, UT_NAMESIZE, user_from_uid(sbp->st_uid, 0), + NAME_WIDTH, UT_NAMESIZE, group_from_gid(sbp->st_gid, 0)); + +@@ -121,7 +121,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp) + (unsigned long)MAJOR(sbp->st_rdev), + (unsigned long)MINOR(sbp->st_rdev)); + else { +- (void)fprintf(fp, "%9llu ", sbp->st_size); ++ (void)fprintf(fp, "%9zu ", sbp->st_size); + } + + /* +-- +2.27.0 + diff --git a/pkg/openbsd/patch/0035-pax-Use-memcpy-to-set-TMAGIC-and-TVERSION-to-avoid-w.patch b/pkg/openbsd/patch/0035-pax-Use-memcpy-to-set-TMAGIC-and-TVERSION-to-avoid-w.patch @@ -0,0 +1,27 @@ +From b6eaf185d9a9c39e31c638ac162ec5f5a364e94d Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 4 Jun 2020 21:44:26 -0700 +Subject: [PATCH] pax: Use memcpy to set TMAGIC and TVERSION to avoid warning + +--- + bin/pax/tar.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/bin/pax/tar.c b/bin/pax/tar.c +index 8c9e4baea9c..c62705b2199 100644 +--- a/bin/pax/tar.c ++++ b/bin/pax/tar.c +@@ -1030,8 +1030,8 @@ ustar_wr(ARCHD *arcn) + break; + } + +- strncpy(hd->magic, TMAGIC, TMAGLEN); +- strncpy(hd->version, TVERSION, TVERSLEN); ++ memcpy(hd->magic, TMAGIC, TMAGLEN); ++ memcpy(hd->version, TVERSION, TVERSLEN); + + /* + * set the remaining fields. Some versions want all 16 bits of mode +-- +2.27.0 + diff --git a/pkg/openbsd/patch/0036-rsync-Fix-some-incorrect-format-specifiers.patch b/pkg/openbsd/patch/0036-rsync-Fix-some-incorrect-format-specifiers.patch @@ -0,0 +1,25 @@ +From dbec208559b72489671f119e695a4c340a288803 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 4 Jun 2020 21:36:24 -0700 +Subject: [PATCH] rsync: Fix some incorrect format specifiers + +--- + usr.bin/rsync/uploader.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c +index 38d5d24fcc7..bf82896d221 100644 +--- a/usr.bin/rsync/uploader.c ++++ b/usr.bin/rsync/uploader.c +@@ -945,7 +945,7 @@ rsync_uploader(struct upload *u, int *fileinfd, + init_blk(&blk.blks[i], &blk, offs, i, mbuf, sess); + offs += blk.len; + LOG3( +- "i=%ld, offs=%lld, msz=%ld, blk.len=%lu, blk.rem=%lu", ++ "i=%zu, offs=%td, msz=%zd, blk.len=%zu, blk.rem=%zu", + i, offs, msz, blk.len, blk.rem); + i++; + } while (i < blk.blksz); +-- +2.27.0 + diff --git a/pkg/openbsd/patch/0037-m4-Declare-dopaste-only-when-it-s-used.patch b/pkg/openbsd/patch/0037-m4-Declare-dopaste-only-when-it-s-used.patch @@ -0,0 +1,26 @@ +From 666a050e706230ba5b0316a316100d8c7e86c93c Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 4 Jun 2020 21:42:18 -0700 +Subject: [PATCH] m4: Declare dopaste only when it's used + +--- + usr.bin/m4/eval.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c +index d226505cab3..fe9fbde3d9c 100644 +--- a/usr.bin/m4/eval.c ++++ b/usr.bin/m4/eval.c +@@ -61,7 +61,9 @@ static void dodump(const char *[], int); + static void dotrace(const char *[], int, int); + static void doifelse(const char *[], int); + static int doincl(const char *); ++#ifdef EXTENDED + static int dopaste(const char *); ++#endif + static void dochq(const char *[], int); + static void dochc(const char *[], int); + static void dom4wrap(const char *); +-- +2.27.0 + diff --git a/pkg/openbsd/ver b/pkg/openbsd/ver @@ -1 +1 @@ -6.7 r0 +6.7 r1