diff --git a/include/zenoh-pico/api/types.h b/include/zenoh-pico/api/types.h index 1db2306c2..fef59ac5e 100644 --- a/include/zenoh-pico/api/types.h +++ b/include/zenoh-pico/api/types.h @@ -186,7 +186,7 @@ _Z_OWNED_TYPE_VALUE(_z_value_t, reply_err) * (unstable) z_reliability_t reliability: The subscription reliability value. */ typedef struct { -#ifdef Z_FEATURE_UNSTABLE_API +#if Z_FEATURE_UNSTABLE_API == 1 z_reliability_t reliability; #else uint8_t __dummy; // Just to avoid empty structures that might cause undefined behavior diff --git a/include/zenoh-pico/config.h b/include/zenoh-pico/config.h index de3cb138e..82b1b155b 100644 --- a/include/zenoh-pico/config.h +++ b/include/zenoh-pico/config.h @@ -21,6 +21,7 @@ #define Z_BATCH_MULTICAST_SIZE 8096 #define Z_CONFIG_SOCKET_TIMEOUT 100 +#define Z_FEATURE_UNSTABLE_API 0 #define Z_FEATURE_MULTI_THREAD 1 #define Z_FEATURE_PUBLICATION 1 #define Z_FEATURE_SUBSCRIPTION 1 diff --git a/include/zenoh-pico/config.h.in b/include/zenoh-pico/config.h.in index b4577f1fe..636fd822d 100644 --- a/include/zenoh-pico/config.h.in +++ b/include/zenoh-pico/config.h.in @@ -21,6 +21,7 @@ #define Z_BATCH_MULTICAST_SIZE @BATCH_MULTICAST_SIZE@ #define Z_CONFIG_SOCKET_TIMEOUT @Z_CONFIG_SOCKET_TIMEOUT@ +#define Z_FEATURE_UNSTABLE_API @Z_FEATURE_UNSTABLE_API@ #define Z_FEATURE_MULTI_THREAD @Z_FEATURE_MULTI_THREAD@ #define Z_FEATURE_PUBLICATION @Z_FEATURE_PUBLICATION@ #define Z_FEATURE_SUBSCRIPTION @Z_FEATURE_SUBSCRIPTION@