[MPlayer-dev-eng] [PATCH] #define __BSD_VISIBLE to 1

KO Myung-Hun komh78 at gmail.com
Sun Feb 16 05:01:01 CET 2014


Hi/2.

Reimar Döffinger wrote:
> On Sat, Feb 15, 2014 at 01:52:43PM +0900, KO Myung-Hun wrote:
>> This fixes the following error,
>>
>> -----
>> libmpcodecs/ad_liba52.c:86:5: error: implicit declaration of function
>> 'swab' [-Werror=implicit-function-declaration]
>> -----
>> -- 
>> KO Myung-Hun
>>
>> Using Mozilla SeaMonkey 2.7.2
>> Under OS/2 Warp 4 for Korean with FixPak #15
>> In VirtualBox v4.1.28 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
>>
>> Korean OS/2 User Community : http://www.ecomstation.co.kr
>>
> 
>> Index: libmpcodecs/ad_liba52.c
>> ===================================================================
>> --- libmpcodecs/ad_liba52.c	(revision 36828)
>> +++ libmpcodecs/ad_liba52.c	(working copy)
>> @@ -17,6 +17,7 @@
>>   */
>>
>>  #define _XOPEN_SOURCE 600
>> +#define __BSD_VISIBLE 1
>>  #include <stdio.h>
>>  #include <stdlib.h>
>>  #include <unistd.h>
> 
> swab is POSIX (see e.g. http://linux.die.net/man/3/swab ) if the
> _XOPEN_SOURCE isn't enough that is a header bug.

Hmmm.. You're right, it seems to be a bug of kLIBC header of OS/2.

> In addition __BSD_VISIBLE is internal stuff, you should never
> define something starting with two _ in a normal C file.

Ok. I didn't know that. Thanks.

> Possibly _BSD_SOURCE would work, but as said it should not be necessary.

You're right, _BSD_SOURCE did it.

> Also on e.g. Android it is not available at all, so avoiding it
> completely would be better, though since I think there isn't much good reason
> to use liba52 anyway it doesn't matter much.

Do you mean _BSD_SOURCE or liba52 ? And liba52 was deprecated ?
Otherwise, I don't want not to use it.

Attach a new patch.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.28 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ad_liba52.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140216/4d2b94d6/attachment.ksh>


More information about the MPlayer-dev-eng mailing list