mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-04-19 21:22:15 +03:00
added include preprocessor for boards compatibility
This commit is contained in:
parent
8d44059cd5
commit
dbe65d631e
@ -15,6 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following class is defined in mbed libraries, in case of STM32H7 include the original library
|
||||
*/
|
||||
#if defined __has_include
|
||||
# if __has_include(<utility/http_parsed_url.h>)
|
||||
# include <utility/http_parsed_url.h>
|
||||
# else
|
||||
# define NO_HTTP_PARSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef NO_HTTP_PARSED
|
||||
#ifndef _MBED_HTTP_PARSED_URL_H_
|
||||
#define _MBED_HTTP_PARSED_URL_H_
|
||||
|
||||
@ -92,3 +104,5 @@ private:
|
||||
};
|
||||
|
||||
#endif // _MBED_HTTP_PARSED_URL_H_
|
||||
#endif // NO_HTTP_PARSED
|
||||
#undef NO_HTTP_PARSED
|
@ -1,3 +1,10 @@
|
||||
#if defined __has_include
|
||||
# if ! __has_include(<utility/http_parser/http_parser.h>) && ! __has_include(<http_parser.h>)
|
||||
# define NO_HTTP_PARSER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef NO_HTTP_PARSER
|
||||
/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev
|
||||
*
|
||||
* Additional changes are licensed under the same terms as NGINX and
|
||||
@ -580,3 +587,5 @@ http_parser_version(void) {
|
||||
HTTP_PARSER_VERSION_MINOR * 0x00100 |
|
||||
HTTP_PARSER_VERSION_PATCH * 0x00001;
|
||||
}
|
||||
|
||||
#endif // NO_HTTP_PARSER
|
Loading…
x
Reference in New Issue
Block a user