]> Savannah Git Hosting - gnulib.git/commitdiff
Fix compilation errors in C++ mode on Android.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Mar 2025 16:35:38 +0000 (17:35 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 1 Apr 2025 14:37:45 +0000 (16:37 +0200)
* lib/string.in.h (memset_explicit, strerrorname_np): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* lib/time.in.h (timespec_getres): Likewise.
* lib/unistd.in.h (copy_file_range): Likewise.

ChangeLog
lib/string.in.h
lib/time.in.h
lib/unistd.in.h

index 53453842a7145636b3471c02a6a1e603572f8b31..19a16c28fcfe8121c73132aacb4257afc55c8f57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-20  Bruno Haible  <bruno@clisp.org>
+
+       Fix compilation errors in C++ mode on Android.
+       * lib/string.in.h (memset_explicit, strerrorname_np): Disable
+       _GL_CXXALIASWARN invocation on non-glibc systems.
+       * lib/time.in.h (timespec_getres): Likewise.
+       * lib/unistd.in.h (copy_file_range): Likewise.
+
 2025-03-18  Collin Funk  <collin.funk1@gmail.com>
 
        futimens: Work around a GNU/Hurd bug.
index 1bae32ad465c02d5462535c7ba63d2be7c94d6b0..70c244972a8457f0929a7e4524c3b383817f1266 100644 (file)
@@ -429,7 +429,9 @@ _GL_FUNCDECL_SYS (memset_explicit, void *,
 #  endif
 _GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (memset_explicit);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef memset_explicit
 # if HAVE_RAW_DECL_MEMSET_EXPLICIT
@@ -1367,7 +1369,9 @@ _GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum), );
 #  endif
 _GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strerrorname_np);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strerrorname_np
 # if HAVE_RAW_DECL_STRERRORNAME_NP
index 60801c972c9340cae341e6f5195c7cae18a8cbff..3ff16e3b3e4b24219278a1391f84de06111729de 100644 (file)
@@ -186,7 +186,9 @@ _GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base),
 #   endif
 _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
 #  endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (timespec_getres);
+# endif
 # elif defined GNULIB_POSIXCHECK
 #  undef timespec_getres
 #  if HAVE_RAW_DECL_TIMESPEC_GETRES
index 23d2d53c959a8bb23686df9748b32e10a762aa4d..96e13ae382535f51ace2322b747a94a3c2e0511a 100644 (file)
@@ -463,7 +463,9 @@ _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
                                              int ofd, off_t *opos,
                                              size_t len, unsigned flags));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (copy_file_range);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef copy_file_range
 # if HAVE_RAW_DECL_COPY_FILE_RANGE