diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2022-09-07 03:07:28 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2022-09-08 11:54:32 -0400 |
commit | 9c822a99944fd185ba58d8bca935ad5c5e6cd3e1 (patch) | |
tree | 07fee5fd8ac29147ae8bcebabfeb75e0aba5a564 /include | |
parent | eafc2b14ac9e40377168b46cab3f1d90c3f32f45 (diff) | |
download | curl-9c822a99944fd185ba58d8bca935ad5c5e6cd3e1.tar.gz |
header: define public API functions as extern c
Prior to this change linker errors would occur if curl_easy_header or
curl_easy_nextheader was called from a C++ unit.
Bug: https://github.com/curl/curl/issues/9424#issuecomment-1238818007
Reported-by: Andrew Lambert
Closes https://github.com/curl/curl/pull/9446
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/header.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/curl/header.h b/include/curl/header.h index 6af29c0c0..1598c6f11 100644 --- a/include/curl/header.h +++ b/include/curl/header.h @@ -24,6 +24,10 @@ * ***************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + struct curl_header { char *name; /* this might not use the same case */ char *value; @@ -63,4 +67,8 @@ CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy, int request, struct curl_header *prev); +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + #endif /* CURLINC_HEADER_H */ |