Patchwork recv_image: fix __USE_GNU hack

login
register
mail settings
Submitter Mike Frysinger
Date Sept. 26, 2010, 9:42 p.m.
Message ID <1285537349-6878-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/65803/
State Accepted, archived
Commit 83a496612c0bdfef14fe6dac2764f1c6226f394e
Headers show

Comments

Mike Frysinger - Sept. 26, 2010, 9:42 p.m.
The __USE_GNU define is an internal define that source code should never
be touching.  So switch it to the proper exported _BSD_SOURCE define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
note: this depends on the program_name cleanup only because it changes
	code in the same area

 recv_image.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - Sept. 27, 2010, 6:35 a.m.
On Sun, 2010-09-26 at 17:42 -0400, Mike Frysinger wrote:
> The __USE_GNU define is an internal define that source code should never
> be touching.  So switch it to the proper exported _BSD_SOURCE define.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Pushed, thanks!

Patch

diff --git a/recv_image.c b/recv_image.c
index fb8e8b3..a3c3fd5 100644
--- a/recv_image.c
+++ b/recv_image.c
@@ -1,11 +1,11 @@ 
 
 #define PROGRAM_NAME "recv_image"
 #define _XOPEN_SOURCE 500
+#define _BSD_SOURCE	/* struct ip_mreq */
 
 #include <errno.h>
 #include <error.h>
 #include <stdio.h>
-#define __USE_GNU
 #include <netdb.h>
 #include <stdlib.h>
 #include <string.h>