From: Bruno Haible Date: Mon, 5 Jun 2023 13:45:25 +0000 (+0200) Subject: posix_spawn-internal: Fix a warning (regression 2022-11-20). X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=fdb80f046d193d3fd38011ec22b3c51e1eb7d654;p=gnulib.git posix_spawn-internal: Fix a warning (regression 2022-11-20). * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2. --- diff --git a/ChangeLog b/ChangeLog index d21e60b5c1..131b441e82 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-02 Bruno Haible striconveha: Don't crash if malloc() returns NULL. 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