summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-15 11:44:21 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-16 13:30:10 -0800
commit7899231c65d68d3b0cef0c5a3a5553d9d566ebdc (patch)
treee7cf95a85156ba4b0046c0feef934ab91129234c
parent10e0e12fcf9889ffff08244d68bbd8300442e408 (diff)
Quiet -Wredundant-decls warnings for strlcat and strlcpy
In file included from /usr/include/xorg/misc.h:119, from /usr/include/xorg/xf86str.h:37, from /usr/include/xorg/xf86.h:44, from v4l.c:25: /usr/include/xorg/os.h:595:1: warning: redundant redeclaration of 'strlcpy' [-Wredundant-decls] 595 | strlcpy(char *dst, const char *src, size_t siz); | ^~~~~~~ In file included from v4l.c:19: /usr/include/string.h:506:15: note: previous declaration of 'strlcpy' with type 'size_t(char * restrict, const char * restrict, size_t)' {aka 'long unsigned int(char * restrict, const char * restrict, long unsigned int)'} 506 | extern size_t strlcpy (char *__restrict __dest, | ^~~~~~~ /usr/include/xorg/os.h:597:1: warning: redundant redeclaration of 'strlcat' [-Wredundant-decls] 597 | strlcat(char *dst, const char *src, size_t siz); | ^~~~~~~ /usr/include/string.h:512:15: note: previous declaration of 'strlcat' with type 'size_t(char * restrict, const char * restrict, size_t)' {aka 'long unsigned int(char * restrict, const char * restrict, long unsigned int)'} 512 | extern size_t strlcat (char *__restrict __dest, | ^~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 00d3ca7..bc599fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,10 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto $REQUIRED_MODULES])
-# Checks for libraries.
+# Checks for library functions
+# We don't use strlcat or strlcpy, but check to quiet a -Wredundant-decls warning
+# from xorg/os.h which will otherwise redefine it.
+AC_CHECK_FUNCS([strlcat strlcpy])
AC_SUBST([moduledir])