blob: 19c63ba608490f977c9a6538ae80ba1058356c01 (
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
|
https://github.com/rizsotto/Bear/pull/521
From 472cbed312444cdcef9102e924c79070ea1d3ab2 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Sat, 15 Apr 2023 19:37:41 +0200
Subject: [PATCH] Avoid implicit function declarations in tests, for C99
compatibility
Include <stdio.h> for printf and define _GNU_SOURCE for execvpe.
Future compilers will not support implicit function declartions by
default, causing these tests to fail to build.
--- a/test/cases/intercept/preload/errno_reset.c
+++ b/test/cases/intercept/preload/errno_reset.c
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
+#include <stdio.h>
int main()
{
--- a/test/cases/intercept/preload/posix/execvpe/success.c
+++ b/test/cases/intercept/preload/posix/execvpe/success.c
@@ -8,6 +8,7 @@
#include "config.h"
#if defined HAVE_UNISTD_H
+#define _GNU_SOURCE
#include <unistd.h>
#endif
|