diff mbox

[mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE

Message ID 1460859111-9977-1-git-send-email-vapier@gentoo.org
State Accepted
Commit d9076259b7f2654599bdf3416ec8ce0ad3b22610
Headers show

Commit Message

Mike Frysinger April 17, 2016, 2:11 a.m. UTC
The _BSD_SOURCE define has been deprecated for a while now.  Instead,
code should be defining _DEFAULT_SOURCE.  By defining both, it'll work
with both new & old versions warning-free.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 misc-utils/recv_image.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Brian Norris April 18, 2016, 4:34 p.m. UTC | #1
On Sat, Apr 16, 2016 at 10:11:51PM -0400, Mike Frysinger wrote:
> The _BSD_SOURCE define has been deprecated for a while now.  Instead,
> code should be defining _DEFAULT_SOURCE.  By defining both, it'll work
> with both new & old versions warning-free.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Pushed to mtd-utils.git
diff mbox

Patch

diff --git a/misc-utils/recv_image.c b/misc-utils/recv_image.c
index 0093831..8bd7356 100644
--- a/misc-utils/recv_image.c
+++ b/misc-utils/recv_image.c
@@ -2,6 +2,7 @@ 
 #define PROGRAM_NAME "recv_image"
 #define _XOPEN_SOURCE 500
 #define _BSD_SOURCE	/* struct ip_mreq */
+#define _DEFAULT_SOURCE
 
 #include <errno.h>
 #include <stdio.h>