Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openrtsp 2022.11.19 #116222

Closed

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

@BrewTestBot BrewTestBot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Nov 20, 2022
@chenrui333
Copy link
Member

  GroupsockHelper.cpp:745:30: error: expected expression
        MAKE_SOCKADDR_IN6(name,IN6ADDR_ANY_INIT, 0);
                               ^

@chenrui333 chenrui333 added the build failure CI fails while building the software label Nov 20, 2022
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Nov 23, 2022
@github-actions github-actions bot closed this Nov 24, 2022
@chenrui333 chenrui333 reopened this Nov 25, 2022
@chenrui333 chenrui333 added upstream issue An upstream issue report is needed help wanted Task(s) needing PRs from the community or maintainers and removed stale No recent activity labels Nov 25, 2022
@ZhongRuoyu
Copy link
Member

ZhongRuoyu commented Dec 8, 2022

This should fix the build:

index eb359069ed7..2e6389c7292 100644
--- a/Formula/openrtsp.rb
+++ b/Formula/openrtsp.rb
@@ -27,6 +27,11 @@ class Openrtsp < Formula
   depends_on "openssl@3"
 
   def install
+    # Fix usage of IN6ADDR_ANY_INIT macro (error: expected expression). See:
+    # https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
+    inreplace "groupsock/GroupsockHelper.cpp", "IN6ADDR_ANY_INIT",
+                                               "in6addr_any"
+
     # Avoid linkage to system OpenSSL
     libs = [
       Formula["openssl@3"].opt_lib/shared_library("libcrypto"),

The problem is, this macro MAKE_SOCKADDR_IN6(name,IN6ADDR_ANY_INIT, 0); expands to:

struct sockaddr_in6 name;
memset(&name, 0, sizeof name);
name.sin6_family = AF_INET6;
name.sin6_addr = IN6ADDR_ANY_INIT;
name.sin6_port = (0);

... where IN6ADDR_ANY_INIT, in turn, expands to {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}. However, that is an initializer list, which is only meant for initialization 1. To assign to existing objects, the external variable in6addr_any, also defined in the same header <netinet/in.h>, comes into play 2.


Update: by the way, this patch still applies to the newest version 2022.12.01.

Footnotes

  1. https://en.cppreference.com/w/c/language/struct_initialization

  2. https://pubs.opengroup.org/onlinepubs/009695399/basedefs/netinet/in.h.html

@chenrui333 chenrui333 added audit failure CI fails while auditing the software CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. and removed upstream issue An upstream issue report is needed build failure CI fails while building the software labels Dec 18, 2022
openrtsp: add build patch

openrtsp: adjust build patch

Signed-off-by: Rui Chen <rui@chenrui.dev>
@chenrui333 chenrui333 added ready to merge PR can be merged once CI is green and removed help wanted Task(s) needing PRs from the community or maintainers labels Dec 18, 2022
@BrewTestBot
Copy link
Member Author

:shipit: @chenrui333 has triggered a merge.

@p-linnane p-linnane deleted the bump-openrtsp-2022.11.19 branch February 24, 2024 19:57
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
audit failure CI fails while auditing the software bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants