Topic: WOLFMQTT_NONBLOCK includes sys/errno.h

Hi,

I am trying to understand design of the wolfmqtt library.

When i define WOLFMQTT_NONBLOCK, the library includes the <sys/errno.h>.

#ifdef WOLFMQTT_NONBLOCK
    #include <sys/errno.h>
#endif

I am running on an arm clang compiler + KEIL environment. This compiler has the errno.h definition in the cpplibx/errno.h, not in the sys directory as gcc does.

Thanks.

Share

Re: WOLFMQTT_NONBLOCK includes sys/errno.h

Hi burakkirazli,

Thanks for your report. I pushed a fix into PR 135 here (https://github.com/wolfSSL/wolfMQTT/pull/135). Please give it a try and let me know if this works.

Thanks,
David Garske, wolfSSL

Share

Re: WOLFMQTT_NONBLOCK includes sys/errno.h

Dear David,

Thanks for your quick response. There are no definitions for EWOULDBLOCK and EAGAIN in the errno.h file for the armclang 6.2 compiler.

Personally, I strongly recommend to change the EWOULDBLOCK and EAGAIN usages in the mqtt_socket file. Most of the time this definitions do not make any problem as long as the person does not use the armclang compiler.

Thanks.

Share

Re: WOLFMQTT_NONBLOCK includes sys/errno.h

Hi burakkirazli,

If you don't have socket error codes for EWOULDBLOCK or EAGAIN then why are you using the WOLFMQTT_NONBLOCK build option?

Perhaps can explain more about your use case and socket library being used?

Thanks,
David Garske, wolfSSL

Share