Browse Source

fix(build): Fix an undefined function warning for fuzzing

Julius Pfrommer 4 years ago
parent
commit
c6b6ed85b2
2 changed files with 4 additions and 0 deletions
  1. 2 0
      tests/fuzz/CMakeLists.txt
  2. 2 0
      tests/testing-plugins/testing_clock.c

+ 2 - 0
tests/fuzz/CMakeLists.txt

@@ -6,6 +6,8 @@ include_directories("${PROJECT_SOURCE_DIR}/src/server")
 # testing_clock.h
 include_directories("${PROJECT_SOURCE_DIR}/tests/testing-plugins")
 
+add_definitions(-DUA_sleep_ms=UA_comboSleep)
+
 if(NOT MSVC)
     add_definitions(-Wno-deprecated-declarations)
 endif()

+ 2 - 0
tests/testing-plugins/testing_clock.c

@@ -43,6 +43,8 @@ UA_realSleep(UA_UInt32 duration) {
 #endif
 }
 
+/* Defined for the architecture via
+ * add_definitions(-DUA_sleep_ms=UA_comboSleep) */
 void
 UA_comboSleep(unsigned long duration) {
     UA_fakeSleep((UA_UInt32)duration);