* [PATCH] Makefile: Explict int type in FALLOC_FL_COLLAPSE_RANGE probe
@ 2023-02-14 16:30 Stefano Brivio
2023-02-14 23:53 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2023-02-14 16:30 UTC (permalink / raw)
To: passt-dev; +Cc: Florian Weimer
From: Florian Weimer <fweimer@redhat.com>
Future compilers will not support implicit ints by default, causing
the probe to always fail.
Link: https://bugs.passt.top/show_bug.cgi?id=42
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
I'm just posting Florian's patch here for ease of review -- I just applied this
by the way. Thanks Florian for the report and for the patch!
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index dd222a8..080c748 100644
--- a/Makefile
+++ b/Makefile
@@ -101,7 +101,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec
FLAGS += -fstack-protector-strong
endif
-C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nx = FALLOC_FL_COLLAPSE_RANGE;
+C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nint x = FALLOC_FL_COLLAPSE_RANGE;
ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
EXTRA_SYSCALLS += fallocate
endif
--
@@ -101,7 +101,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec
FLAGS += -fstack-protector-strong
endif
-C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nx = FALLOC_FL_COLLAPSE_RANGE;
+C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nint x = FALLOC_FL_COLLAPSE_RANGE;
ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
EXTRA_SYSCALLS += fallocate
endif
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: Explict int type in FALLOC_FL_COLLAPSE_RANGE probe
2023-02-14 16:30 [PATCH] Makefile: Explict int type in FALLOC_FL_COLLAPSE_RANGE probe Stefano Brivio
@ 2023-02-14 23:53 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2023-02-14 23:53 UTC (permalink / raw)
To: Stefano Brivio; +Cc: passt-dev, Florian Weimer
[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]
On Tue, Feb 14, 2023 at 05:30:05PM +0100, Stefano Brivio wrote:
> From: Florian Weimer <fweimer@redhat.com>
>
> Future compilers will not support implicit ints by default, causing
> the probe to always fail.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=42
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> I'm just posting Florian's patch here for ease of review -- I just applied this
> by the way. Thanks Florian for the report and for the patch!
>
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index dd222a8..080c748 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -101,7 +101,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec
> FLAGS += -fstack-protector-strong
> endif
>
> -C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nx = FALLOC_FL_COLLAPSE_RANGE;
> +C := \#define _GNU_SOURCE\n\#include <fcntl.h>\nint x = FALLOC_FL_COLLAPSE_RANGE;
> ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
> EXTRA_SYSCALLS += fallocate
> endif
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-15 1:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 16:30 [PATCH] Makefile: Explict int type in FALLOC_FL_COLLAPSE_RANGE probe Stefano Brivio
2023-02-14 23:53 ` David Gibson
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).