--- /dev/null
+From 10202b813f86e3f4d477fd82ee7fceac3bc2ebd0 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Sun, 13 Oct 2019 21:21:28 +0200
+Subject: [PATCH] configure: define HAVE_LIBBSD when libbsd was found
+
+Source of the patch:
+http://lists.busybox.net/pipermail/buildroot/2019-October/261510.html
+
+Patch sent upstream:
+https://gitlab.freedesktop.org/xorg/lib/libxfont/merge_requests/6
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f507c28..131713d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,7 +52,8 @@ AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
+
+ # Checks for library functions.
+ AC_CHECK_FUNCS([poll readlink])
+-AC_SEARCH_LIBS([strlcat], [bsd])
++AC_SEARCH_LIBS([strlcat], [bsd],
++ [AC_DEFINE(HAVE_LIBBSD,1,[Has libbsd])])
+ AC_CONFIG_LIBOBJ_DIR([src/util])
+ AC_REPLACE_FUNCS([reallocarray strlcat strlcpy])
+
+--
+2.20.1
+
XLIB_LIBXFONT2_LICENSE = MIT
XLIB_LIBXFONT2_LICENSE_FILES = COPYING
XLIB_LIBXFONT2_INSTALL_STAGING = YES
+# 0001-configure-define-HAVE_LIBBSD-when-libbsd-was-found.patch
+XLIB_LIBXFONT2_AUTORECONF = YES
XLIB_LIBXFONT2_DEPENDENCIES = \
freetype \
xlib_libfontenc \
xorgproto \
xfont_encodings
+ifeq ($(BR2_PACKAGE_LIBBSD),y)
+XLIB_LIBXFONT2_DEPENDENCIES += libbsd
+endif
+
HOST_XLIB_LIBXFONT2_DEPENDENCIES = \
host-freetype \
host-xlib_libfontenc \