aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-support/tgt/files/0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch
blob: 6106b90ba8b7422cad2866e916d5317d63b7911d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 5f6a261e44fec387e66d8b89d69f9602de5d5c53 Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@freescale.com>
Date: Thu, 10 Apr 2014 11:26:39 +0800
Subject: [PATCH] Correct the path of header files check in Yocto build env

Upstream-Status: Inappropriate [the fix is specific to Yocto build env]

Current Makefile will check headers on host instead of Yocto sysroot, following
error appears. Change the path of header check.
| bs_aio.c:34:20: fatal error: libaio.h: No such file or directory
| #include <libaio.h>
|                     ^
| compilation terminated.

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 usr/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index 453eb1a..191503d 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,10 +1,10 @@
 sbindir ?= $(PREFIX)/sbin
 
-ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
+ifneq ($(shell test -e $(SYSROOT)/usr/include/linux/signalfd.h && echo 1),)
 CFLAGS += -DUSE_SIGNALFD
 endif
 
-ifneq ($(shell test -e /usr/include/sys/timerfd.h && echo 1),)
+ifneq ($(shell test -e $(SYSROOT)/usr/include/sys/timerfd.h && echo 1),)
 CFLAGS += -DUSE_TIMERFD
 endif
 
@@ -18,7 +18,7 @@ TGTD_OBJS += bs_rbd.o
 LIBS += -lrados -lrbd
 endif
 
-ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),)
+ifneq ($(shell test -e $(SYSROOT)/usr/include/sys/eventfd.h && test -e $(SYSROOT)/usr/include/libaio.h && echo 1),)
 CFLAGS += -DUSE_EVENTFD
 TGTD_OBJS += bs_aio.o
 LIBS += -laio
-- 
1.9.1