mirror of
https://github.com/Fishwaldo/libzwaveip.git
synced 2025-07-09 14:28:40 +00:00
Fix up builds on OSX
This commit is contained in:
parent
6ceacedca1
commit
ae11b1ac6c
8 changed files with 30 additions and 8 deletions
|
@ -9,8 +9,12 @@ add_executable(reference_client reference_client.c tokenizer.c
|
|||
hexchar.c command_completion.c util.c tokquote/tokquote.c)
|
||||
add_executable(reference_listener reference_listener.c util.c)
|
||||
|
||||
target_link_libraries(reference_client zwaveip edit parse_xml xml2 zw_cmd_tool -lbsd -ltermcap ${MDNS_LIBS})
|
||||
target_link_libraries(reference_listener zwaveip parse_xml xml2)
|
||||
if (APPLE)
|
||||
target_link_libraries(reference_client zwaveip edit parse_xml xml2 zw_cmd_tool -ltermcap ${MDNS_LIBS} ${OPENSSL_LIBRARIES})
|
||||
elseif(UNIX)
|
||||
target_link_libraries(reference_client zwaveip edit parse_xml xml2 zw_cmd_tool -lbsd -ltermcap ${MDNS_LIBS} ${OPENSSL_LIBRARIES})
|
||||
endif ()
|
||||
target_link_libraries(reference_listener zwaveip parse_xml xml2 ${OPENSSL_LIBRARIES})
|
||||
|
||||
add_custom_command(TARGET reference_client PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/config $<TARGET_FILE_DIR:reference_client>)
|
||||
|
|
|
@ -145,7 +145,7 @@ int static parse_token(const char* token) {
|
|||
case DESTINATION: {
|
||||
rl_basic_word_break_characters = "\"";
|
||||
rl_quote_completion = 1;
|
||||
struct zip_service* s = zresource_services;
|
||||
struct zip_service* s = zresource_get();
|
||||
for (; s; s = s->next) {
|
||||
if (strcmp(s->service_name, token) == 0) {
|
||||
parser.state = COMMAND_CLASS;
|
||||
|
@ -271,7 +271,7 @@ static char* operation_generator(const char* text, int state) {
|
|||
}
|
||||
break;
|
||||
case DESTINATION: {
|
||||
struct zip_service* s = zresource_services;
|
||||
struct zip_service* s = zresource_get();
|
||||
int n = 0;
|
||||
char buf[512];
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ static void cmd_send(const char *input) {
|
|||
service_name++; /* strip opening quote */
|
||||
service_name[strlen(service_name) - 1] = 0; /* strip closing quote */
|
||||
}
|
||||
for (n = zresource_services; n; n = n->next) {
|
||||
for (n = zresource_get(); n; n = n->next) {
|
||||
if (0 == strcmp(n->service_name, service_name)) {
|
||||
const char *result;
|
||||
/* Try connecting via IPv6 first */
|
||||
|
@ -484,7 +484,7 @@ static void cmd_list_service(void) {
|
|||
;
|
||||
|
||||
printf("List of discovered Z/IP services:\n");
|
||||
for (n = zresource_services; n; n = n->next) {
|
||||
for (n = zresource_get(); n; n = n->next) {
|
||||
printf("--- %20s: \"%s\"\n", n->host_name, n->service_name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue