0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-20 17:09:13 +00:00
Files
packages/net/aircrack-ng/patches/105-build-support-strlcat-strlcpy-from-musl-or-recent-gl.patch
Christian Marangi bd21652b79 aircrack-ng: fix wrong inclusion of libbsd if detected
Currently aircrack-ng try to link with libbsd if it does detect the
library in staging_dir. This is the case with buildbot where every
package is selected and compiled.

Fix this by adding a pending patch that permits to disable libbsd
inclusion even if detected and set the related config flag.

aircrack-ng use 2 function of libbsd and it's not worth to include the
entire library for 2 simple function for string manipulation.

Also add an additional patch that permits to use musl or glibc version
of these string functions.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-10-30 13:28:50 -07:00

31 lines
1.0 KiB
Diff

From 6317063da827732dbc5cc0dd1650ed016bd2927c Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Sun, 29 Oct 2023 14:41:18 +0100
Subject: [PATCH] build: support strlcat/strlcpy from musl or recent glibc
Musl or recent glibc added support for these additional string function,
strlcat and strlcpy hence the compat function are not needed and the
builtin version can be used instead.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
build/m4/aircrack_ng_compat.m4 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/build/m4/aircrack_ng_compat.m4
+++ b/build/m4/aircrack_ng_compat.m4
@@ -41,11 +41,12 @@ AC_DEFUN([AIRCRACK_NG_COMPAT], [
AC_ARG_WITH(libbsd,
[AS_HELP_STRING([--with-libbsd[[=auto|yes|no]]], [use BSD library, [default=auto]])])
+AC_CHECK_FUNCS([strlcpy strlcat], [:])
+
case $with_libbsd in
yes | "" | auto)
AC_CHECK_HEADERS([bsd/string.h], [HAVE_BSD_STRING_H=yes])
AC_CHECK_LIB([bsd], [strlcpy], [:])
- AC_CHECK_FUNCS([strlcpy strlcat], [:])
;;
esac