]> 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>
Mon, 5 Jun 2023 13:45:25 +0000 (15:45 +0200)
* lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.

ChangeLog
lib/spawni.c

index b0c742b085e955f91fe32356e4be1a00a8f17ddb..b761ca3a8e3bc929115e23be4876dede344f5ac0 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-05  Bruno Haible  <bruno@clisp.org>
 
        file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
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