[vlc-devel] [vlc-commits] contrib: pthreads: remove useless patch

Martin Storsjö martin at martin.st
Mon May 21 10:55:34 CEST 2018


> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May 16 12:28:04 2018 +0200| [d18abd95a86bbd6dcf7660251cce3886c08a4b73] | committer: Steve Lhomme
> 
> contrib: pthreads: remove useless patch
> 
> The code compiles fine without it, INLINE is properly defined
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d18abd95a86bbd6dcf7660251cce3886c08a4b73
> ---

Even if this is irrelevant now that contribs is switched to use 
winpthreads instead, I just wanted to point out that the patch definitely 
wasn't useless.

If you had cared to read the commit that added it, 
c407f7fbbdf75712f5e7a634321975cd60484db8, I tried to explain it properly 
there. Apparently I should have had to make it a git style patch to have 
the explanation nearby to avoid people deeming it useless.

commit c407f7fbbdf75712f5e7a634321975cd60484db8
Author: Martin Storsjö <martin at martin.st>
Date:   Fri Jan 5 23:53:37 2018 +0200

     contrib: pthreads: Fix building with llvm-mingw

     [...]

     Remove an inline declaration on a function that can't be inline-only
     (static inline).

     For non-static inline functions in C, the compiler can choose to
     use the inline function itself, or assume that a definition exists
     in a different translation unit. In this case, clang seems to
     not inline ptw32_cond_check_need_init and creates an undefined
     reference to the same function that should be defined in another
     translation unit (which doesn't exist).

     See https://www.greenend.org.uk/rjk/tech/inline.html for more details
     on this.

// Martin


More information about the vlc-devel mailing list