diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-22 13:05:19 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-22 15:56:55 +0100 |
commit | 134320a310c64fc3b497618cabc2749bd98735fb (patch) | |
tree | 671c8f4a700d068901000cad498b53d0193ddadb /modules | |
parent | 9746be9cd8ccaebc0e1052c19da8d5644766caad (diff) | |
download | gnulib-134320a310c64fc3b497618cabc2749bd98735fb.tar.gz |
Resolve conflicts for functions introduced in Android API level 23.
* lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
* modules/unistd (Makefile.am): Substitute REPLACE_SETHOSTNAME.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Conditionally set
REPLACE_SETHOSTNAME.
* modules/sethostname (Depends-on, configure.ac): Consider
REPLACE_SETHOSTNAME.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/sethostname | 7 | ||||
-rw-r--r-- | modules/unistd | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/modules/sethostname b/modules/sethostname index 56b68b2ad4..6057ef06cd 100644 --- a/modules/sethostname +++ b/modules/sethostname @@ -8,12 +8,13 @@ m4/gethostname.m4 Depends-on: unistd -errno [test $HAVE_SETHOSTNAME = 0] -fopen-gnu [test $HAVE_SETHOSTNAME = 0] +errno [test $HAVE_SETHOSTNAME = 0 || test $REPLACE_SETHOSTNAME = 1] +fopen-gnu [test $HAVE_SETHOSTNAME = 0 || test $REPLACE_SETHOSTNAME = 1] configure.ac: gl_FUNC_SETHOSTNAME -gl_CONDITIONAL([GL_COND_OBJ_SETHOSTNAME], [test $HAVE_SETHOSTNAME = 0]) +gl_CONDITIONAL([GL_COND_OBJ_SETHOSTNAME], + [test $HAVE_SETHOSTNAME = 0 || test $REPLACE_SETHOSTNAME = 1]) gl_UNISTD_MODULE_INDICATOR([sethostname]) Makefile.am: diff --git a/modules/unistd b/modules/unistd index 065e4ad52e..ddb0991f85 100644 --- a/modules/unistd +++ b/modules/unistd @@ -211,6 +211,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SETHOSTNAME''@|$(REPLACE_SETHOSTNAME)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ |