]> Savannah Git Hosting - gnulib.git/commitdiff
posix_spawn-internal: Fix a warning (regression 2022-11-20).
authorBruno Haible <bruno@clisp.org>
Mon, 5 Jun 2023 13:45:25 +0000 (15:45 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 9 Jun 2023 09:30:29 +0000 (11:30 +0200)
* lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.

ChangeLog
lib/spawni.c

index d21e60b5c1a5e786a79c2fcfb7408dacfdea81bb..131b441e82a67d5229acc1b83f2d309ba76661f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-05  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        striconveha: Don't crash if malloc() returns NULL.
index cc9511fdd8dfc04586aef385f595c8e58d345a97..84d1fb27f673d0f61a46d3e7d0e53f5551d149b6 100644 (file)
@@ -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