diff mbox series

[v3,2/2] define GNU_SOURCE for asprintf()

Message ID 20210130182711.2473-2-bouyer@netbsd.org (mailing list archive)
State New, archived
Headers show
Series [v3,1/2] xenpmd.c: use dynamic allocation | expand

Commit Message

Manuel Bouyer Jan. 30, 2021, 6:27 p.m. UTC
#define _GNU_SOURCE to get for asprintf() prototype on Linux.
Harmless on NetBSD.

Signed-off-by: Manuel Bouyer <bouyer@netbsd.org>
---
 tools/xenpmd/xenpmd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ian Jackson Feb. 1, 2021, 3:09 p.m. UTC | #1
Manuel Bouyer writes ("[PATCH v3 2/2] define GNU_SOURCE for asprintf()"):
> #define _GNU_SOURCE to get for asprintf() prototype on Linux.
> Harmless on NetBSD.

Release-Acked-by: Ian Jackson <iwj@xenproject.org>

This needs to be folded into the previous patch so I will do so.

Ian.
diff mbox series

Patch

diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c
index e432aad856..8e783181e1 100644
--- a/tools/xenpmd/xenpmd.c
+++ b/tools/xenpmd/xenpmd.c
@@ -32,6 +32,7 @@ 
  * passed to the guest when appropriate battery ports are read/written to.
  */
 
+#define _GNU_SOURCE         /* for asprintf() */
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>