[FFmpeg-cvslog] build: Add feature test macros for glibc 2.19+

Diego Biurrun git at videolan.org
Wed Nov 8 00:12:22 EET 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sat Jul  8 13:18:39 2017 +0200| [825e463a170c7004c63030dc484b2b2de869227b] | committer: Diego Biurrun

build: Add feature test macros for glibc 2.19+

glibc introduced _DEFAULT_SOURCE in version 2.19 to replace _BSD_SOURCE and
_SVID_SOURCE, which were deprecated in version 2.20. Add _DEFAULT_SOURCE
where the latter two are used to be forwards-compatible and avoid warnings
about the use of deprecated definitions.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=825e463a170c7004c63030dc484b2b2de869227b
---

 libavformat/os_support.c | 1 +
 libavformat/udp.c        | 1 +
 libswscale/utils.c       | 1 +
 3 files changed, 3 insertions(+)

diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 6a0c1fa7fc..c125dbe9ba 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -21,6 +21,7 @@
  */
 
 /* needed by inet_aton() */
+#define _DEFAULT_SOURCE
 #define _SVID_SOURCE
 
 #include "config.h"
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 9d4c130e5b..a29eb1bd33 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -24,6 +24,7 @@
  * UDP protocol
  */
 
+#define _DEFAULT_SOURCE
 #define _BSD_SOURCE     /* Needed for using struct ip_mreq with recent glibc */
 
 #include "avformat.h"
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 248a8081ff..6b17955f54 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#define _DEFAULT_SOURCE
 #define _SVID_SOURCE // needed for MAP_ANONYMOUS
 #include <assert.h>
 #include <inttypes.h>



More information about the ffmpeg-cvslog mailing list