RT-Thread-packages / at_device

AT component porting or samples for different devices
Apache License 2.0
215 stars 182 forks source link

Exclude #include <at_socket.h> when socket is disable. #171

Open majianjia opened 2 years ago

majianjia commented 2 years ago

https://github.com/RT-Thread-packages/at_device/blob/4d0186531962516f2819f59d50a856f71ba79072/inc/at_device.h#L19

Related to the change: https://github.com/RT-Thread/packages/pull/1168#event-5921806655

When the socket is disabling, the compiler cannot find this header. This header should be conditionally excluded. for example

#ifdef AT_USING_SOCKET
#include <at_socket.h>
#endif