From 3d208c3135e0487f2ef196375a8a3ff28f4dde1b Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 21 Nov 2022 16:51:40 +0100 Subject: [PATCH] [headers] Check for sys/kd.h --- config2.h.in | 3 +++ configure.ac | 1 + meson.build | 4 ++++ src/intl/charsets.c | 3 +++ 4 files changed, 11 insertions(+) diff --git a/config2.h.in b/config2.h.in index 21979ce3..09774a4b 100644 --- a/config2.h.in +++ b/config2.h.in @@ -728,6 +728,9 @@ /* Define to 1 if you have the header file. */ #mesondefine HAVE_SYS_IOCTL_H +/* Define to 1 if you have the header file */ +#mesondefine HAVE_SYS_KD_H + /* Define to 1 if you have the header file, and it defines `DIR'. */ #mesondefine HAVE_SYS_NDIR_H diff --git a/configure.ac b/configure.ac index 24ce199f..b00bf12d 100644 --- a/configure.ac +++ b/configure.ac @@ -217,6 +217,7 @@ AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_HEADERS(sys/cygwin.h io.h) AC_CHECK_HEADERS(sys/fmutex.h) AC_CHECK_HEADERS(sys/ioctl.h sys/sockio.h) +AC_CHECK_HEADERS(sys/kd.h) AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(sys/socket.h) diff --git a/meson.build b/meson.build index 116dc3c4..97278a44 100644 --- a/meson.build +++ b/meson.build @@ -227,6 +227,10 @@ if compiler.has_header('sys/ioctl.h') conf_data.set('HAVE_SYS_IOCTL_H', 1) endif +if compiler.has_header('sys/kd.h') + conf_data.set('HAVE_SYS_KD_H', 1) +endif + if compiler.has_header('sys/sockio.h') conf_data.set('HAVE_SYS_SOCKIO_H', 1) endif diff --git a/src/intl/charsets.c b/src/intl/charsets.c index cb722cec..865019de 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -30,7 +30,10 @@ #endif #include + +#ifdef HAVE_SYS_KD_H #include +#endif #include "elinks.h"