[MPlayer-dev-eng] [PATCH] #define __BSD_VISIBLE to 1
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Feb 15 15:24:23 CET 2014
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.
In addition __BSD_VISIBLE is internal stuff, you should never
define something starting with two _ in a normal C file.
Possibly _BSD_SOURCE would work, but as said it should not be necessary.
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.
More information about the MPlayer-dev-eng
mailing list