Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame^] | 1 | From 93fea40915d01be6d02587a0b8be85a642e6a8d5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Zhenhua Luo <zhenhua.luo@freescale.com> |
| 3 | Date: Thu, 10 Apr 2014 11:26:39 +0800 |
| 4 | Subject: [PATCH] Correct the path of header files check in Yocto build env |
| 5 | |
| 6 | Upstream-Status: Inappropriate [the fix is specific to Yocto build env] |
| 7 | |
| 8 | Current Makefile will check headers on host instead of Yocto sysroot, following |
| 9 | error 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 | |
| 15 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> |
| 16 | |
| 17 | --- |
| 18 | usr/Makefile | 6 +++--- |
| 19 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 20 | |
| 21 | diff --git a/usr/Makefile b/usr/Makefile |
| 22 | index 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 |