[vlc-devel] [PATCH] demux: ts: fix compilation on OS/2

Rémi Denis-Courmont remi at remlab.net
Wed Apr 8 11:29:28 CEST 2015


Le 2015-04-08 11:42, KO Myung-Hun a écrit :
> Ping ?

This is ugly. Rename the function.

>
> KO Myung-Hun wrote:
>> -----
>>   CC       demux/libts_plugin_la-ts.lo
>> In file included from demux/ts.c:43:0:
>> ../include/vlc_charset.h:154:1: warning: 'warn_unused_result' 
>> attribute ignored [-Wattributes]
>>  {
>>  ^
>> demux/ts.c:467:18: error: 'PID' redeclared as different kind of 
>> symbol
>>  static ts_pid_t *PID( demux_sys_t *, uint16_t i_pid );
>>                   ^
>> In file included from f:/lang/gcc/usr/include/os2.h:39:0,
>>                  from ../include/vlc_common.h:416,
>>                  from demux/ts.c:33:
>> f:/lang/gcc/usr/include/os2emx.h:314:15: note: previous declaration 
>> of 'PID' was here
>>  typedef ULONG PID;
>>                ^
>> -----
>> ---
>>  modules/demux/ts.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/modules/demux/ts.c b/modules/demux/ts.c
>> index d518cb5..f63e0f4 100644
>> --- a/modules/demux/ts.c
>> +++ b/modules/demux/ts.c
>> @@ -463,6 +463,11 @@ static void ts_pes_Del( demux_t *, ts_pes_t * 
>> );
>>  static ts_psi_t *ts_psi_New( demux_t * );
>>  static void ts_psi_Del( demux_t *, ts_psi_t * );
>>
>> +#ifdef __OS2__
>> +/* OS/2 has a type PID. To avoid conflicts, define a forwarder 
>> macro. */
>> +# define PID(d, p) TS_PID(d, p)
>> +#endif
>> +
>>  /* Helpers */
>>  static ts_pid_t *PID( demux_sys_t *, uint16_t i_pid );
>>  static ts_pmt_t * GetProgramByID( demux_sys_t *, int i_program );

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list