blob: 173ecb620d745858f855d4c50efb49e024596518 [file] [log] [blame]
Patrick Williams03907ee2022-05-01 06:28:52 -05001From 93fea40915d01be6d02587a0b8be85a642e6a8d5 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Thu, 10 Apr 2014 11:26:39 +0800
4Subject: [PATCH] Correct the path of header files check in Yocto build env
5
6Upstream-Status: Inappropriate [the fix is specific to Yocto build env]
7
8Current Makefile will check headers on host instead of Yocto sysroot, following
9error appears. Change the path of header check.
10| bs_aio.c:34:20: fatal error: libaio.h: No such file or directory
11| #include <libaio.h>
12| ^
13| compilation terminated.
14
15Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
16
17---
18 usr/Makefile | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/usr/Makefile b/usr/Makefile
22index decf13c..9ff8f15 100644
23--- a/usr/Makefile
24+++ b/usr/Makefile
25@@ -1,11 +1,11 @@
26 sbindir ?= $(PREFIX)/sbin
27 libdir ?= $(PREFIX)/lib/tgt
28
29-ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
30+ifneq ($(shell test -e $(SYSROOT)/usr/include/linux/signalfd.h && echo 1),)
31 CFLAGS += -DUSE_SIGNALFD
32 endif
33
34-ifneq ($(shell test -n $(shell find /usr/include -name "timerfd.h" | head -n1) && echo 1),)
35+ifneq ($(shell test -n $(shell find $(SYSROOT)/usr/include -name "timerfd.h" | head -n1) && echo 1),)
36 CFLAGS += -DUSE_TIMERFD
37 endif
38
39@@ -25,7 +25,7 @@ ifneq ($(SD_NOTIFY),)
40 CFLAGS += -DUSE_SYSTEMD
41 endif
42
43-ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
44+ifneq ($(shell test -e $(SYSROOT)/usr/include/sys/eventfd.h && test -e $(SYSROOT)/usr/include/libaio.h && echo 1),)
45 CFLAGS += -DUSE_EVENTFD
46 TGTD_OBJS += bs_aio.o
47 LIBS += -laio