From 4fcd3212a5ee82e1f3a4fd80b41f56eeeacdce8c Mon Sep 17 00:00:00 2001 From: linjun9528 Date: Mon, 27 Dec 2021 15:57:56 +0800 Subject: [PATCH 1/2] add compilation conditions Signed-off-by: linjun9528 --- BUILD.gn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 36130326..c59ae75c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -185,11 +185,15 @@ ohos_shared_library("libselinux") { "$LIBSELINUX_ROOT_DIR/include", "$LIBSELINUX_ROOT_DIR/src", "$LIBPCRE2_ROOT_DIR/include", - "$LIBFTS_ROOT_DIR/sys/", "$LIBFTS_ROOT_DIR/include", "$LIBSEPOL_ROOT_DIR/cil/include", "$LIBSEPOL_ROOT_DIR/include", ] + if (is_linux == false) { + include_dirs += [ + "$LIBFTS_ROOT_DIR/sys/", + ] + } cflags = [ "-D_GNU_SOURCE", "-w", -- Gitee From bca0138ae8b71293e34ccc289fa9f0104e423b49 Mon Sep 17 00:00:00 2001 From: linjun9528 Date: Mon, 27 Dec 2021 17:00:13 +0800 Subject: [PATCH 2/2] add compilation conditions Signed-off-by: linjun9528 --- BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index c59ae75c..d1449466 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -189,11 +189,11 @@ ohos_shared_library("libselinux") { "$LIBSEPOL_ROOT_DIR/cil/include", "$LIBSEPOL_ROOT_DIR/include", ] + if (is_linux == false) { - include_dirs += [ - "$LIBFTS_ROOT_DIR/sys/", - ] + include_dirs += [ "$LIBFTS_ROOT_DIR/sys/" ] } + cflags = [ "-D_GNU_SOURCE", "-w", -- Gitee