user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH 1/4] syscall: initialize buffer for vec()
Date: Thu, 29 Sep 2022 17:48:28 +0000	[thread overview]
Message-ID: <20220929174831.2919939-2-e@80x24.org> (raw)
In-Reply-To: <20220929174831.2919939-1-e@80x24.org>

This is needed for older Perls (tested perl 5.16.3 on CentOS 7).
---
 lib/PublicInbox/Syscall.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Syscall.pm b/lib/PublicInbox/Syscall.pm
index 46496bca..412ca64f 100644
--- a/lib/PublicInbox/Syscall.pm
+++ b/lib/PublicInbox/Syscall.pm
@@ -454,7 +454,7 @@ no warnings 'once';
 
 *recv_cmd4 = sub ($$$) {
 	my ($sock, undef, $len) = @_;
-	vec($_[1], ($len + 1) * 8, 1) = 0;
+	vec($_[1] //= '', ($len + 1) * 8, 1) = 0;
 	my $cmsghdr = "\0" x msg_controllen; # 10 * sizeof(int)
 	my $iov = pack('P'.TMPL_size_t, $_[1], $len);
 	my $mh = pack('PL' . # msg_name, msg_namelen (socklen_t (U32))

  reply	other threads:[~2022-09-29 17:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 18:46 "make test" for 1.9.0 on centos-7 Konstantin Ryabitsev
2022-09-28 19:59 ` Eric Wong
2022-09-28 20:51   ` Konstantin Ryabitsev
2022-09-29 17:48     ` [PATCH 0/4] CentOS 7 fixes + fix Gcf2 everywhere Eric Wong
2022-09-29 17:48       ` Eric Wong [this message]
2022-09-29 17:48       ` [PATCH 2/4] treewide: use --globoff with curl(1) Eric Wong
2022-09-29 17:48       ` [PATCH 3/4] gcf2: fix syntax error and require PublicInbox::Git Eric Wong
2022-09-29 17:48       ` [PATCH 4/4] tests: no IPv6 on old Net::NNTP, Mail::IMAPClient, HTTP::Tiny Eric Wong
2022-09-29 19:10       ` [PATCH 0/4] CentOS 7 fixes + fix Gcf2 everywhere Konstantin Ryabitsev
2022-09-29 19:40         ` Eric Wong
2022-09-29 17:54 ` "make test" for 1.9.0 on centos-7 Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220929174831.2919939-2-e@80x24.org \
    --to=e@80x24.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).