aboutsummaryrefslogtreecommitdiffstats
path: root/community/xbps/configure-fix-vasprintf-test.patch
blob: fcb99a837035ea5875191f5391628db3e7631f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 58107bf76ad1310abf52d44d36fc165f2efd629d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 24 Mar 2017 10:19:36 +0100
Subject: [PATCH] configure: fix vasprintf test

Fix the test for vasprintf function which failed with musl libc and
fortify-headers on aarch64:

_vasprintf.c:4:24: error: incompatible type for argument 3 of 'vasprintf'
  vasprintf(NULL, NULL, NULL);
                        ^~~~
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 861a67d0..b043dab0 100755
--- a/configure
+++ b/configure
@@ -390,7 +390,8 @@ else
 #define _GNU_SOURCE
 #include <stdio.h>
 int main(void) {
-	vasprintf(NULL, NULL, NULL);
+	va_list ap;
+	vasprintf(NULL, NULL, ap);
 	return 0;
 }
 EOF
-- 
2.12.1