diff --git a/include/coap2/libcoap.h b/include/coap2/libcoap.h index bee4cfea..77ba5db2 100644 --- a/include/coap2/libcoap.h +++ b/include/coap2/libcoap.h @@ -40,14 +40,10 @@ typedef USHORT in_port_t; # endif #endif #ifndef COAP_DEPRECATED -# if defined(__cplusplus) -# define COAP_DEPRECATED __attribute__ ((deprecated)) +# if defined(_MSC_VER) +# define COAP_DEPRECATED __declspec(deprecated) # else -# if defined(_MSC_VER) -# define COAP_DEPRECATED __declspec(deprecated) -# else -# define COAP_DEPRECATED __attribute__ ((deprecated)) -# endif +# define COAP_DEPRECATED __attribute__ ((deprecated)) # endif #endif