diff --git a/services/init/lite/init.c b/services/init/lite/init.c index 11655e52c1cd2b9d346721ae15ec589ce2f393a5..2c2d82606e5456d4058b0d8fea20e762ed9fd32e 100755 --- a/services/init/lite/init.c +++ b/services/init/lite/init.c @@ -13,8 +13,9 @@ * limitations under the License. */ #include "init.h" -#include "init_log.h" +#include "init_group_manager.h" #include "init_jobs_internal.h" +#include "init_log.h" #include "init_utils.h" #ifndef __LINUX__ #include "init_stage.h" diff --git a/services/loopevent/BUILD.gn b/services/loopevent/BUILD.gn index dc493b0e42116b67cbbd115d1e5c322ed6a09af5..78f2e1c55a3b6684ad587b3f7da6e618d0cf5dbc 100755 --- a/services/loopevent/BUILD.gn +++ b/services/loopevent/BUILD.gn @@ -42,7 +42,7 @@ if (defined(ohos_lite)) { sources = common_sources include_dirs = common_include - + defines = [ "_GNU_SOURCE" ] deps = [ "//base/startup/init_lite/services/log:init_log", "//base/startup/init_lite/services/utils:libinit_tools", @@ -56,7 +56,7 @@ if (defined(ohos_lite)) { sources = common_sources include_dirs = common_include - + defines = [ "_GNU_SOURCE" ] deps = [ "//base/startup/init_lite/services/log:init_log", "//base/startup/init_lite/services/utils:libinit_tools", diff --git a/services/utils/BUILD.gn b/services/utils/BUILD.gn index 770a48239477361515d4473061c357eec9df7643..f79f26b899f198d0cbe9e1deb385a71b0a2bd78a 100755 --- a/services/utils/BUILD.gn +++ b/services/utils/BUILD.gn @@ -29,6 +29,7 @@ if (defined(ohos_lite)) { "//base/startup/init_lite/services/log:init_log", "//third_party/bounds_checking_function:libsec_static", ] + defines = [ "_GNU_SOURCE" ] } } else { import("//build/ohos.gni") @@ -50,6 +51,7 @@ if (defined(ohos_lite)) { "//base/startup/init_lite/services/log:init_log", "//third_party/bounds_checking_function:libsec_static", ] + defines = [ "_GNU_SOURCE" ] part_name = "init" } diff --git a/watchdog/BUILD.gn b/watchdog/BUILD.gn index 35eb3689e7d0c49efb1495b219f377d12d268f65..395d2214c14a8fd7d49a8748c83c86f518066fc9 100755 --- a/watchdog/BUILD.gn +++ b/watchdog/BUILD.gn @@ -23,9 +23,9 @@ if (defined(ohos_lite)) { "//base/startup/init_lite/interfaces/innerkits/include", ] deps = [ "//base/startup/init_lite/services/log:init_log" ] + defines = [ "_GNU_SOURCE" ] if (ohos_kernel_type == "linux") { - defines = [ "LINUX_WATCHDOG" ] - defines += [ "_GNU_SOURCE" ] + defines += [ "LINUX_WATCHDOG" ] } } } else {