From 5d7b6c888c3d94566db4304ab1ce3eab23d122c4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 5 Jun 2023 15:45:25 +0200 Subject: [PATCH] posix_spawn-internal: Fix a warning (regression 2022-11-20). * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2. --- ChangeLog | 5 +++++ lib/spawni.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b0c742b085..b761ca3a8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-06-05 Bruno Haible + + posix_spawn-internal: Fix a warning (regression 2022-11-20). + * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2. + 2023-06-05 Bruno Haible file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12). diff --git a/lib/spawni.c b/lib/spawni.c index cc9511fdd8..84d1fb27f6 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -857,7 +857,7 @@ __spawni (pid_t *pid, const char *prog_filename, /* The warning "warning: 'vfork' is deprecated: Use posix_spawn or fork" seen on macOS 12 is pointless, as we use vfork only when it is safe or when the user has explicitly requested it. Silence this warning. */ -#if __GNUC__ >= 3 +#if _GL_GNUC_PREREQ (4, 2) # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -- 2.39.5