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

fix build with gcc-15 #206

Closed
wants to merge 1 commit into from
Closed

fix build with gcc-15 #206

wants to merge 1 commit into from

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Dec 8, 2024

Fixes void declarations

In file included from ./libfaad/output.c:31:
./libfaad/common.h:244:18: error: conflicting types for 'index'; have 'char *(void)'
  244 | #  define strchr index
      |                  ^~~~~
./libfaad/common.h:247:7: note: in expansion of macro 'strchr'
  247 | char *strchr(), *strrchr();
      |       ^~~~~~
In file included from /usr/include/string.h:462,
                 from ./libfaad/common.h:205:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
./libfaad/common.h:245:19: error: conflicting types for 'rindex'; have 'char *(void)'
  245 | #  define strrchr rindex
      |                   ^~~~~~
./libfaad/libfaad/common.h:247:18: note: in expansion of macro 'strrchr'
  247 | char *strchr(), *strrchr();
      |                  ^~~~~~~
/usr/include/strings.h:96:14: note: previous declaration of 'rindex' with type 'char *(const char *, int)'
   96 | extern char *rindex (const char *__s, int __c)
      |              ^~~~~~

@fabiangreffrath
Copy link
Collaborator

These declarations are only compiled if building without STDC_HEADERS, which is unconditionally enabled in the build systems. How do you compile faad2?

@heitbaum
Copy link
Contributor Author

heitbaum commented Dec 9, 2024

These declarations are only compiled if building without STDC_HEADERS, which is unconditionally enabled in the build systems. How do you compile faad2?

Found where the issue was - I have tested with the external 2.11.1 successfully - closing PR.

Thanks for pointing in the right direction.

@heitbaum heitbaum closed this Dec 9, 2024
@heitbaum heitbaum deleted the patch-1 branch December 9, 2024 06:49
@fabiangreffrath
Copy link
Collaborator

Thanks for pointing in the right direction.

Thanks for pointing me! I have just removed the offending macro from the code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants