Commit 26e8895b authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Ronald S. Bultje

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 af181827.
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent c3e8de1c
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#define _DEFAULT_SOURCE
#define _BSD_SOURCE #define _BSD_SOURCE
#include <sys/stat.h> #include <sys/stat.h>
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* UDP protocol * UDP protocol
*/ */
#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */ #define _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */
#include "avformat.h" #include "avformat.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "config.h" #include "config.h"
#define _DEFAULT_SOURCE
#define _SVID_SOURCE // needed for MAP_ANONYMOUS #define _SVID_SOURCE // needed for MAP_ANONYMOUS
#define _DARWIN_C_SOURCE // needed for MAP_ANON #define _DARWIN_C_SOURCE // needed for MAP_ANON
#include <inttypes.h> #include <inttypes.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment