Compile hint.c as C++

This commit is contained in:
Johan Wikman
2017-03-23 16:51:45 +02:00
parent d257a8a905
commit ebf22eee8f
2 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,8 @@ add_library(maxscale-common SHARED
externcmd.cc externcmd.cc
paths.cc paths.cc
hashtable.cc hashtable.cc
hint.c housekeeper.c load_utils.c log_manager.cc maxscale_pcre2.c misc.c mlist.c modutil.c monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c) hint.cc
housekeeper.c load_utils.c log_manager.cc maxscale_pcre2.c misc.c mlist.c modutil.c monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c)
if(WITH_JEMALLOC) if(WITH_JEMALLOC)
target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES}) target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES})

View File

@ -52,7 +52,7 @@ hint_dup(const HINT *hint)
ptr2->type = ptr1->type; ptr2->type = ptr1->type;
if (ptr1->data) if (ptr1->data)
{ {
ptr2->data = MXS_STRDUP_A(ptr1->data); ptr2->data = MXS_STRDUP_A((const char*)ptr1->data);
} }
else else
{ {
@ -60,7 +60,7 @@ hint_dup(const HINT *hint)
} }
if (ptr1->value) if (ptr1->value)
{ {
ptr2->value = MXS_STRDUP_A(ptr1->value); ptr2->value = MXS_STRDUP_A((const char*)ptr1->value);
} }
else else
{ {