bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* sys_ioctl: Fix compilation error in C++ mode on Android
@ 2023-01-10  8:13 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2023-01-10  8:13 UTC (permalink / raw)
  To: bug-gnulib

In a testdir on Android, I'm seeing this compilation error:

clang++ -ferror-limit=0 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I../../gltests -I..  -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -I/data/data/com.termux/files/home/local/include -Wall  -Wno-error -g -O2 -c -o test-sys_ioctl-c++.o ../../gltests/test-sys_ioctl-c++.cc
In file included from ../../gltests/test-sys_ioctl-c++.cc:22:
../gllib/sys/ioctl.h:546:1: error: reference to overloaded function could not be resolved; did you mean to call it?
_GL_CXXALIASWARN (ioctl);
^~~~~~~~~~~~~~~~~~~~~~~~

This patch fixes it.


2023-01-10  Bruno Haible  <bruno@clisp.org>

	sys_ioctl: Fix compilation error in C++ mode on Android.
	* lib/sys_ioctl.in.h (ioctl): Disable _GL_CXXALIASWARN invocation on
	non-glibc systems.

diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h
index 26acd19c8d..86840e45a9 100644
--- a/lib/sys_ioctl.in.h
+++ b/lib/sys_ioctl.in.h
@@ -62,7 +62,9 @@ _GL_FUNCDECL_SYS (ioctl, int,
 _GL_CXXALIAS_SYS (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ioctl);
+# endif
 #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 # undef ioctl
 # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-10  8:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10  8:13 sys_ioctl: Fix compilation error in C++ mode on Android Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).