* [PATCH mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE
@ 2016-04-17 2:11 Mike Frysinger
2016-04-18 16:34 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2016-04-17 2:11 UTC (permalink / raw)
To: linux-mtd
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(+)
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>
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE
2016-04-17 2:11 [PATCH mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE Mike Frysinger
@ 2016-04-18 16:34 ` Brian Norris
0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2016-04-18 16:34 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linux-mtd
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-18 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 2:11 [PATCH mtd-utils] fix build warnings w/newer glibc & _BSD_SOURCE Mike Frysinger
2016-04-18 16:34 ` Brian Norris
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.