diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-15 11:44:21 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-16 14:46:33 -0800 |
commit | 5abe92c24fa3de28f740490228b66ca5f42f3322 (patch) | |
tree | 95f1caa0a40d6db8c5b7442cf40a3d3da0d0c288 | |
parent | bc4fa3b99e979bb1ad63812bc53ff0979c8baac4 (diff) |
Quiet -Wredundant-decls from xorg/os.h fallbacks for new libc functions
The Xorg headers provide their own versions of strlcat, strlcpy, and
timingsafe_memcmp for platforms that don't have them in libc yet, but
rely on configure to set HAVE_* defines to determine if they should be
defined in the headers.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/edid.c | 4 | ||||
-rw-r--r-- | src/pointer.c | 4 | ||||
-rw-r--r-- | src/vboxvideo.h | 4 |
4 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1610463..e879a95 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,10 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901]) fi -# Checks for libraries. +# Checks for library functions +# We don't use strlcat, strlcpy, or timingsafe_memcmp, but check to quiet +# -Wredundant-decls warning from xorg/os.h which will otherwise redefine them. +AC_CHECK_FUNCS([strlcat strlcpy timingsafe_memcmp]) DRIVER_NAME=vboxvideo AC_SUBST([DRIVER_NAME]) @@ -36,6 +36,10 @@ * Michael Thayer <michael.thayer@oracle.com> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "misc.h" #include "xf86DDC.h" #include "xf86Crtc.h" diff --git a/src/pointer.c b/src/pointer.c index 0b01ab4..4d6635c 100644 --- a/src/pointer.c +++ b/src/pointer.c @@ -25,6 +25,10 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef PCIACCESS # include "xf86Pci.h" # include <Pci.h> diff --git a/src/vboxvideo.h b/src/vboxvideo.h index 0058d72..33b8ec0 100644 --- a/src/vboxvideo.h +++ b/src/vboxvideo.h @@ -55,6 +55,10 @@ #include <VBoxVideoVBE.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "xf86.h" #include "xf86str.h" #include "xf86Cursor.h" |