Skip to content

Commit

Permalink
opusfile: Add patch to not use c89 if mingw
Browse files Browse the repository at this point in the history
Fixes #1573
  • Loading branch information
1480c1 committed Apr 4, 2020
1 parent 2a716c4 commit 0091924
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/media-suite_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ if [[ $standalone = y ]] && enabled libopus; then
_deps=(opus.pc "$MINGW_PREFIX"/lib/pkgconfig/{libssl,ogg}.pc)
if do_vcs "https://github.com/xiph/opusfile.git"; then
do_uninstall "${_check[@]}"
do_patch "https://gist.githubusercontent.com/1480c1/c3f32033ad4a07264e2063f0fb38fc1b/raw/0001-Disable-cert-store-integration-if-OPENSSL_VERSION_NU.patch" am
do_patch "https://gist.githubusercontent.com/1480c1/beb86dbd8f79e3c1e06d6e9053804f52/raw/0001-Disable-cert-store-integration-if-OPENSSL_VERSION_NU.patch" am
do_patch "https://gist.githubusercontent.com/1480c1/beb86dbd8f79e3c1e06d6e9053804f52/raw/0002-configure-Only-add-std-c89-if-not-mingw-because-of-c.patch" am
do_autogen
do_separate_confmakeinstall --disable-{examples,doc}
do_checkIfExist
Expand Down

4 comments on commit 0091924

@RiCONfru
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try proposing these patches to upstream?

@1480c1
Copy link
Member Author

@1480c1 1480c1 commented on 0091924 Apr 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try proposing the c89 one since technically inline in c89 is a gnu extension, the other one is lifted off a comment from @lazka from xiph/opusfile#13 so that one will rely on if he wants to

@1480c1
Copy link
Member Author

@1480c1 1480c1 commented on 0091924 Apr 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather, the inline part is actually caused by mingw-w64's headers having inline in them, so I'm not sure how much of this is because of opusfile or actually just clang's issue

In file included from ../src/internal.c:16:

In file included from ../src/internal.h:31:

E:\Source\ffmpeg\MAS\msys64\mingw32\i686-w64-mingw32\include\stdlib.h:395:3: error: unknown type name 'inline'

  __CRT_INLINE __MINGW_ATTRIB_NORETURN void  __cdecl _Exit(int status)

  ^

E:\Source\ffmpeg\MAS\msys64\mingw32\i686-w64-mingw32\include\_mingw.h:91:31: note: expanded from macro '__CRT_INLINE'

#  define __CRT_INLINE extern inline __attribute__((__gnu_inline__))

                              ^

@wiiaboo
Copy link
Member

@wiiaboo wiiaboo commented on 0091924 Apr 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the wincert one is because we still have libressl (which is still on a lower OpenSSL version), so it's kind of specific to the combination of opusfile+libressl.
And the other one you're not sure if it's an issue with opusfile's usage of inline or with mingw's usage of inline. So compiling with MinGW means c89 should not be used?

Yeah, it's muddy.

Please sign in to comment.