OCT 修正部分编译选项开关编译问题
This commit is contained in:
parent
8deb30766a
commit
809913da5d
|
@ -51,10 +51,12 @@ ENDIF ()
|
||||||
|
|
||||||
IF (USED_OPENDHCPDDNS)
|
IF (USED_OPENDHCPDDNS)
|
||||||
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} dualserverd)
|
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} dualserverd)
|
||||||
ELSE ()
|
|
||||||
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} opendhcpd)
|
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
IF (USED_OPENDHCPD)
|
||||||
|
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} opendhcpd)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} common)
|
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} common)
|
||||||
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} ${COMMON_LIBS})
|
TARGET_LINK_LIBRARIES(${PROJECT_TARGET} ${COMMON_LIBS})
|
||||||
TARGET_INCLUDE_DIRECTORIES(${PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/../)
|
TARGET_INCLUDE_DIRECTORIES(${PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/../)
|
||||||
|
|
|
@ -57,9 +57,9 @@ LINK_LIBRARIES(${COMMON_LIBS})
|
||||||
ADD_LIBRARY(${LIB_PROJECT_TARGET} ${C_SRC} ${C_HEADS})
|
ADD_LIBRARY(${LIB_PROJECT_TARGET} ${C_SRC} ${C_HEADS})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} haywire)
|
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")
|
IF (USED_OPENDHCPD)
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} opendhcpd)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
TARGET_INCLUDE_DIRECTORIES(${LIB_PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/)
|
TARGET_INCLUDE_DIRECTORIES(${LIB_PROJECT_TARGET} PUBLIC ${PROJECT_BINARY_DIR}/)
|
||||||
|
|
||||||
MESSAGE(+++++++++++++++++++${PROJECT_BINARY_DIR})
|
|
|
@ -366,6 +366,7 @@ typedef struct {
|
||||||
const char *pIfName;
|
const char *pIfName;
|
||||||
} DHCPD_SETUP, *PDHCPD_SETUP;
|
} DHCPD_SETUP, *PDHCPD_SETUP;
|
||||||
|
|
||||||
|
#ifdef OPENDHCPD_ON
|
||||||
static void dhcpd_task(void *pArg) {
|
static void dhcpd_task(void *pArg) {
|
||||||
PDHCPD_SETUP p = (PDHCPD_SETUP)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) {
|
static int on_cmd7(void *pTbl[], const char *pName, void *pInfo) {
|
||||||
int ret;
|
int ret;
|
||||||
PDHCPD_SETUP p;
|
PDHCPD_SETUP p;
|
||||||
|
|
|
@ -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);
|
config_setting_t *pObj = config_setting_get_elem(pItem, i);
|
||||||
|
|
||||||
switch (pValue->cfgId) {
|
switch (pValue->cfgId) {
|
||||||
|
#if OPENDHCPD_ON
|
||||||
case CFG_DHCP_RANGE_SET: {
|
case CFG_DHCP_RANGE_SET: {
|
||||||
zvect_index idx = -1;
|
zvect_index idx = -1;
|
||||||
const char *rangAddr, *subnet, *dnsSvr, *gateway;
|
const char *rangAddr, *subnet, *dnsSvr, *gateway;
|
||||||
|
@ -282,7 +283,7 @@ static int load_array_obj(const char *pKeyName, PCONFIG_ITEM pValue) {
|
||||||
pValue->isChanged = TRUE;
|
pValue->isChanged = TRUE;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
|
||||||
#include "prj_config.h"
|
#include "prj_config.h"
|
||||||
|
#include "user_errno.h"
|
||||||
|
|
||||||
#if LWIP_ON
|
#if LWIP_ON
|
||||||
#include "user_info.h"
|
#include "user_info.h"
|
||||||
|
@ -49,17 +50,6 @@ static void lwip_init_env() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
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;
|
int ret;
|
||||||
#ifdef OPENDHCPDDNS_ON
|
#ifdef OPENDHCPDDNS_ON
|
||||||
return dual_server_main(argc, argv);
|
return dual_server_main(argc, argv);
|
||||||
|
|
Loading…
Reference in New Issue