init: fix compile warning

Signed-off-by: xionglei6 <xionglei6@huawei.com>
This commit is contained in:
xionglei6 2022-01-25 17:16:16 +08:00
parent 15603b8f8b
commit cd05a15426
3 changed files with 6 additions and 3 deletions

View File

@ -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"

View File

@ -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"
}

View File

@ -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 {