contiki: re-add dtls_package_name and dtls_package_version
Statically define PACKAGE_NAME and PACKAGE_VERSION in contiki platform header.
This will require maintaining them in addition to values in configure.ac.
Change-Id: I08948dfdb4ddeafeed273a917367ee5ad237df8f
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
diff --git a/dtls_debug.c b/dtls_debug.c
index 7b3ae10..d3bad4d 100644
--- a/dtls_debug.c
+++ b/dtls_debug.c
@@ -41,7 +41,6 @@
static int maxlog = DTLS_LOG_WARN; /* default maximum log level */
-#ifndef WITH_CONTIKI
const char *dtls_package_name() {
return PACKAGE_NAME;
}
@@ -49,7 +48,6 @@
const char *dtls_package_version() {
return PACKAGE_VERSION;
}
-#endif /* WITH_CONTIKI */
log_t
dtls_get_log_level() {
diff --git a/dtls_debug.h b/dtls_debug.h
index d46b6da..80e56d6 100644
--- a/dtls_debug.h
+++ b/dtls_debug.h
@@ -57,14 +57,11 @@
DTLS_LOG_NOTICE, DTLS_LOG_INFO, DTLS_LOG_DEBUG
} log_t;
-#ifndef WITH_CONTIKI
-/* Contiki does not have the required PACKAGE_ variables configured */
/** Returns a zero-terminated string with the name of this library. */
const char *dtls_package_name(void);
/** Returns a zero-terminated string with the library version. */
const char *dtls_package_version(void);
-#endif /* WITH_CONTIKI */
/** Returns the current log level. */
log_t dtls_get_log_level(void);
diff --git a/platform-specific/platform.h b/platform-specific/platform.h
index 9179f2d..83c46ea 100644
--- a/platform-specific/platform.h
+++ b/platform-specific/platform.h
@@ -14,6 +14,12 @@
#include "contiki-conf.h"
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "tinydtls"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.8.6"
+
/* support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 */
#ifndef DTLS_CONF_ECC
#define DTLS_CONF_ECC 1