xref: /OK3568_Linux_fs/buildroot/package/sg3_utils/0002-configure.ac-fix-uclibc-ng-build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 1e95d5b8c507a49f6d15d2795dc46d82b4d1ded0 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3*4882a593SmuzhiyunDate: Tue, 16 Nov 2021 08:41:48 +0100
4*4882a593SmuzhiyunSubject: [PATCH] configure.ac: fix uclibc-ng build
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunFix the following build failure with uclibc-ng raised because SG_IO is
7*4882a593Smuzhiyunnot defined:
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun/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':
10*4882a593Smuzhiyunsg_dd.c:(.text+0xc6c): undefined reference to `sg_chk_n_print3'
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunFixes:
13*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/38a0dfc70a21ce574368b7a485deb231f778b3e7
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
16*4882a593Smuzhiyun[Upstream status: https://github.com/doug-gilbert/sg3_utils/pull/8]
17*4882a593Smuzhiyun---
18*4882a593Smuzhiyun configure.ac | 2 +-
19*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-)
20*4882a593Smuzhiyun
21*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac
22*4882a593Smuzhiyunindex 0a65d94..23378ad 100644
23*4882a593Smuzhiyun--- a/configure.ac
24*4882a593Smuzhiyun+++ b/configure.ac
25*4882a593Smuzhiyun@@ -107,7 +107,7 @@ case "${host}" in
26*4882a593Smuzhiyun 		AC_DEFINE_UNQUOTED(HAVE_NVME, 1, [Found NVMe])
27*4882a593Smuzhiyun 		check_for_getrandom
28*4882a593Smuzhiyun                 CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO";;
29*4882a593Smuzhiyun-        *-*-linux-gnu* | *-*-linux*)
30*4882a593Smuzhiyun+        *-*-linux-gnu* | *-*-linux* | *-*-uclinux-gnu* | *-*-uclinux*)
31*4882a593Smuzhiyun                 AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux])
32*4882a593Smuzhiyun 		check_for_linux_sg_v4_hdr
33*4882a593Smuzhiyun 		check_for_getrandom
34*4882a593Smuzhiyun--
35*4882a593Smuzhiyun2.33.0
36*4882a593Smuzhiyun
37