Bug 265567 - security/masscan: fix build on armv6/armv7
Summary: security/masscan: fix build on armv6/armv7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-02 04:58 UTC by Robert Clausecker
Modified: 2022-08-04 19:53 UTC (History)
2 users (show)

See Also:
taguchi.ch: maintainer-feedback+
nc: merge-quarterly+


Attachments
security/masscan: fix build on armv6/armv7 (1.64 KB, patch)
2022-08-02 04:58 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-08-02 04:58:37 UTC
Created attachment 235628 [details]
security/masscan: fix build on armv6/armv7

- fix armv6/armv7 rdtsc patch
 - add a missing include file

Tested with Poudriere on armv7 arm64 FreeBSD 13.1.
The self test passes.
Please MFH if possible.
Comment 1 Chie Taguchi 2022-08-02 12:36:32 UTC
Hello Robert,

Thanks for your patch.
I have considered both issues.
And I approve of "fix armv6/armv7 rdtsc patch".
But in the latter case, it seems to be a cosmetic issue.
On HEAD in the upper stream, another method has already solved that issue.
So I do not agree to add this include file.

Regards
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-08-02 15:07:01 UTC
(In reply to Chie Taguchi from comment #1)

Hi,

Without the include file, the htons() function is undeclared.  This causes behaviour to be undefined.  While compilers currently accept this for compatibility with pre-standard C programs, it is also in violation of C99 and newer standards.  It is not a cosmetic issue.
Comment 3 Chie Taguchi 2022-08-02 16:14:17 UTC
Hi,

I see. That is certainly an important issue.
The problem should be fixed in the next release, but it might be good to use that include file as a workaround at this time.

Please commit this patch.

BTW, If you do not mind, I will PR rdtsc issue to upstream with the aarch64 modification.

Thanks.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-08-02 18:55:52 UTC
Comment on attachment 235628 [details]
security/masscan: fix build on armv6/armv7

(In reply to Chie Taguchi from comment #3)

Hi,

Thank you for the prompt response.  Please feel free to upstream any patches.
I've marked your patch as “approved” so it can be committed by a ports committer in the next day.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-08-04 19:52:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e93cb96a07d574708cb409696ba1257c16de32f0

commit e93cb96a07d574708cb409696ba1257c16de32f0
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-02 04:56:16 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-08-04 19:52:09 +0000

    security/masscan: fix build on armv7

     - fix armv6/armv7 rdtsc patch
     - add a missing include file

     PR:            265567
     Approved by:   taguchi.ch AT gmail DOT com <maintainer>

 security/masscan/files/patch-src_out-tcp-services.c (new) | 10 ++++++++++
 security/masscan/files/patch-src_smack1.c                 |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)
Comment 6 Neel Chauhan freebsd_committer freebsd_triage 2022-08-04 19:53:41 UTC
Committed!
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-08-04 19:53:52 UTC
A commit in branch 2022Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9c24af4c660962a2ed4b33bc625a926a740d4413

commit 9c24af4c660962a2ed4b33bc625a926a740d4413
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-02 04:56:16 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-08-04 19:53:16 +0000

    security/masscan: fix build on armv7

     - fix armv6/armv7 rdtsc patch
     - add a missing include file

     PR:            265567
     Approved by:   taguchi.ch AT gmail DOT com <maintainer>

    (cherry picked from commit e93cb96a07d574708cb409696ba1257c16de32f0)

 security/masscan/files/patch-src_out-tcp-services.c (new) | 10 ++++++++++
 security/masscan/files/patch-src_smack1.c                 |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)