OCT 修正部分编译选项开关编译问题

This commit is contained in:
黄昕 2022-12-15 16:26:39 +08:00
parent 8deb30766a
commit 809913da5d
5 changed files with 12 additions and 19 deletions

View File

@ -51,10 +51,12 @@ ENDIF ()
IF (USED_OPENDHCPDDNS)
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} dualserverd)
ELSE ()
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} opendhcpd)
ENDIF ()
IF (USED_OPENDHCPD)
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} opendhcpd)
ENDIF()
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} common)
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} ${COMMON_LIBS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/../)

View File

@ -57,9 +57,9 @@ LINK_LIBRARIES(${COMMON_LIBS})
ADD_LIBRARY(${LIB_PROJECT_TARGET} ${C_SRC} ${C_HEADS})
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} haywire)
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} opendhcpd)
#TARGET_INCLUDE_DIRECTORIES(${LIB_PROJECT_TARGET} PUBLIC "${PROJECT_BINARY_DIR}/srcs/libs")
TARGET_INCLUDE_DIRECTORIES(${LIB_PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/)
IF (USED_OPENDHCPD)
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} opendhcpd)
ENDIF()
MESSAGE(+++++++++++++++++++${PROJECT_BINARY_DIR})
TARGET_INCLUDE_DIRECTORIES(${LIB_PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/)

View File

@ -366,6 +366,7 @@ typedef struct {
const char *pIfName;
} DHCPD_SETUP, *PDHCPD_SETUP;
#ifdef OPENDHCPD_ON
static void dhcpd_task(void *pArg) {
PDHCPD_SETUP p = (PDHCPD_SETUP)pArg;
@ -388,7 +389,6 @@ static void dhcpd_task(void *pArg) {
}
}
#if OPENDHCPD_ON
static int on_cmd7(void *pTbl[], const char *pName, void *pInfo) {
int ret;
PDHCPD_SETUP p;

View File

@ -251,6 +251,7 @@ static int load_array_obj(const char *pKeyName, PCONFIG_ITEM pValue) {
config_setting_t *pObj = config_setting_get_elem(pItem, i);
switch (pValue->cfgId) {
#if OPENDHCPD_ON
case CFG_DHCP_RANGE_SET: {
zvect_index idx = -1;
const char *rangAddr, *subnet, *dnsSvr, *gateway;
@ -282,7 +283,7 @@ static int load_array_obj(const char *pKeyName, PCONFIG_ITEM pValue) {
pValue->isChanged = TRUE;
}
} break;
#endif
default:
break;
}

View File

@ -10,6 +10,7 @@
#include "init.h"
#include "prj_config.h"
#include "user_errno.h"
#if LWIP_ON
#include "user_info.h"
@ -49,17 +50,6 @@ static void lwip_init_env() {
#endif
int main(int argc, char **argv) {
const char *pJson =
"{\n"
" \"ver\": 3,\n"
" \"cryptoType\": 1,\n"
" \"timeStamp\": 1599187216753,\n"
" \"msgContent\": "
"\"ewogICAgInVzZXJNYWMiOiBbCiAgICAgICIwMDowYzoyOTpiNTpkMzozYSIsCiAgICAgICIwMDowYzoyOTpiNTpk"
"MzozYiIsCiAgICAgICIw"
"MDowYzoyOTowZDo2Nzo2ZSIsCiAgICBdCn0=\"\n"
"}";
int ret;
#ifdef OPENDHCPDDNS_ON
return dual_server_main(argc, argv);