未验证 提交 6228d281 编写于 作者: O openharmony_ci 提交者: Gitee

!278 fix:L1 compile warning

Merge pull request !278 from 熊磊/init127_3
...@@ -81,6 +81,7 @@ if (defined(ohos_lite)) { ...@@ -81,6 +81,7 @@ if (defined(ohos_lite)) {
} }
if (ohos_kernel_type == "linux") { if (ohos_kernel_type == "linux") {
defines += [ "NEED_EXEC_RCS_LINUX" ] defines += [ "NEED_EXEC_RCS_LINUX" ]
defines += [ "_GNU_SOURCE" ]
ldflags += [ ldflags += [
"-lm", "-lm",
"-lpthread", "-lpthread",
......
...@@ -60,7 +60,7 @@ int SetAmbientCapability(int cap) ...@@ -60,7 +60,7 @@ int SetAmbientCapability(int cap)
return 0; return 0;
} }
#ifdef __LINUX__ #if (defined __LINUX__) && (defined NEED_EXEC_RCS_LINUX)
static pid_t g_waitPid = -1; static pid_t g_waitPid = -1;
static sem_t *g_waitSem = NULL; static sem_t *g_waitSem = NULL;
static void SignalRegWaitSem(pid_t waitPid, sem_t *waitSem) static void SignalRegWaitSem(pid_t waitPid, sem_t *waitSem)
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <stddef.h> #include <stddef.h>
#include <string.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
......
...@@ -90,6 +90,8 @@ ohos_shared_library("param_client") { ...@@ -90,6 +90,8 @@ ohos_shared_library("param_client") {
defines = [ "INIT_AGENT" ] defines = [ "INIT_AGENT" ]
defines += [ "_GNU_SOURCE" ]
if (param_security == "selinux") { if (param_security == "selinux") {
sources += [ "adapter/param_selinux.c" ] sources += [ "adapter/param_selinux.c" ]
defines += [ "PARAM_SUPPORT_SELINUX" ] defines += [ "PARAM_SUPPORT_SELINUX" ]
......
...@@ -184,6 +184,7 @@ ohos_unittest("init_ut") { ...@@ -184,6 +184,7 @@ ohos_unittest("init_ut") {
"PARAM_SUPPORT_SAVE_PERSIST", "PARAM_SUPPORT_SAVE_PERSIST",
"PARAM_SUPPORT_DAC", "PARAM_SUPPORT_DAC",
] ]
defines += [ "_GNU_SOURCE" ]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
......
...@@ -26,6 +26,7 @@ if (defined(ohos_lite)) { ...@@ -26,6 +26,7 @@ if (defined(ohos_lite)) {
if (storage_type == "emmc") { if (storage_type == "emmc") {
defines += [ "USE_EMMC_STORAGE" ] defines += [ "USE_EMMC_STORAGE" ]
} }
defines += [ "_GNU_SOURCE" ]
include_dirs = [ include_dirs = [
"//base/startup/init_lite/services/include", "//base/startup/init_lite/services/include",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册