nbdkit/0002-cc-Run-test-against-local-nbdkit-plugin.h-not-instal.patch

50 lines
1.6 KiB
Diff
Raw Normal View History

2020-06-04 13:31:33 +00:00
From 28e66a6f4999ed7edf51ca268d6831f3d11dcb2e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 4 Jun 2020 14:28:51 +0100
Subject: [PATCH 2/2] cc: Run test against local <nbdkit-plugin.h>, not
installed.
The problem was revealed when trying to compile nbdkit 1.21.7 in
Fedora Koji.
Fixes: commit a4339e3c3c17d8b95ddf0b20cf015de5078620ec
---
plugins/cc/nbdkit-cc-plugin.pod | 5 +++--
tests/test-shebang-cc.sh | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/cc/nbdkit-cc-plugin.pod b/plugins/cc/nbdkit-cc-plugin.pod
index c8ef3950..ecd7a81e 100644
--- a/plugins/cc/nbdkit-cc-plugin.pod
+++ b/plugins/cc/nbdkit-cc-plugin.pod
@@ -27,11 +27,12 @@ L<nbdkit-plugin(3)>.
Simple plugins from the nbdkit source tree can be compiled and run
directly using commands such as:
- $ nbdkit cc plugins/example1/example1.c EXTRA_CFLAGS="-I."
+ $ nbdkit cc plugins/example1/example1.c EXTRA_CFLAGS="-I. -Iinclude"
You can also read the source from stdin using C<->:
- $ nbdkit cc - EXTRA_CFLAGS="-I." < plugins/example1/example1.c
+ $ nbdkit cc - EXTRA_CFLAGS="-I. -Iinclude" \
+ < plugins/example1/example1.c
To replace the compiler flags:
diff --git a/tests/test-shebang-cc.sh b/tests/test-shebang-cc.sh
index 7f15ebff..83d9815e 100755
--- a/tests/test-shebang-cc.sh
+++ b/tests/test-shebang-cc.sh
@@ -45,6 +45,7 @@ fi
requires guestfish --version
$script -fv -U - \
+ EXTRA_CFLAGS="-I$SRCDIR/../include" \
--run '
guestfish \
add "" protocol:nbd server:unix:$unixsocket : \
--
2.25.0