1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

all: add _DEFAULT_SOURCE locally wherever needed

Glibc 2.20 onwards generates a deprecation warning for usage of _BSD_SOURCE and _SVID_SOURCE.
The solution from man feature_test_macros is to define both _DEFAULT_SOURCE and the old macros.
This solution is on the lines of the one in commit af1818276e.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde 2015-10-03 07:41:00 -05:00 committed by Ronald S. Bultje
parent c3e8de1c24
commit 26e8895b73
3 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include <sys/stat.h>
#include "libavutil/avstring.h"

View File

@ -24,6 +24,7 @@
* UDP protocol
*/
#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */
#include "avformat.h"

View File

@ -20,6 +20,7 @@
#include "config.h"
#define _DEFAULT_SOURCE
#define _SVID_SOURCE // needed for MAP_ANONYMOUS
#define _DARWIN_C_SOURCE // needed for MAP_ANON
#include <inttypes.h>