fix FTBS on missing asprintf() prototype on GNU/Linux

On GNU/Linux we have to define _GNU_SOURCE before including stdio.h,
in order to get the prototype for asprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-03-07 18:35:27 +01:00
parent e0bd955e18
commit 9d1598b98c
2 changed files with 10 additions and 0 deletions

View File

@@ -32,6 +32,10 @@
#include "config.h"
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <unistd.h>
#include <string.h>
#include <stdio.h>

View File

@@ -24,6 +24,12 @@
#include <config.h>
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdio.h>
#ifdef XF86DRM_MODE
#include <fcntl.h>
#include <sys/mman.h>