xref: /OK3568_Linux_fs/buildroot/package/sg3_utils/0002-configure.ac-fix-uclibc-ng-build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 1e95d5b8c507a49f6d15d2795dc46d82b4d1ded0 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Tue, 16 Nov 2021 08:41:48 +0100
4Subject: [PATCH] configure.ac: fix uclibc-ng build
5
6Fix the following build failure with uclibc-ng raised because SG_IO is
7not defined:
8
9/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: sg_dd.o: in function `sg_read_low.constprop.0':
10sg_dd.c:(.text+0xc6c): undefined reference to `sg_chk_n_print3'
11
12Fixes:
13 - http://autobuild.buildroot.org/results/38a0dfc70a21ce574368b7a485deb231f778b3e7
14
15Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
16[Upstream status: https://github.com/doug-gilbert/sg3_utils/pull/8]
17---
18 configure.ac | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/configure.ac b/configure.ac
22index 0a65d94..23378ad 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -107,7 +107,7 @@ case "${host}" in
26 		AC_DEFINE_UNQUOTED(HAVE_NVME, 1, [Found NVMe])
27 		check_for_getrandom
28                 CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO";;
29-        *-*-linux-gnu* | *-*-linux*)
30+        *-*-linux-gnu* | *-*-linux* | *-*-uclinux-gnu* | *-*-uclinux*)
31                 AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux])
32 		check_for_linux_sg_v4_hdr
33 		check_for_getrandom
34--
352.33.0
36
37