diff mbox series

[meta-networking] curlpp: Fix build issue

Message ID 20241001165743.1061735-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-networking] curlpp: Fix build issue | expand

Commit Message

alperak Oct. 1, 2024, 4:57 p.m. UTC
Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 ...id-conversion-from-int-to-CURLoption.patch | 36 +++++++++++++++++++
 .../recipes-support/curlpp/curlpp_0.8.1.bb    |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch

Comments

Khem Raj Oct. 1, 2024, 5:35 p.m. UTC | #1
On Tue, Oct 1, 2024 at 9:57 AM Alper Ak via lists.openembedded.org
<alperyasinak1=gmail.com@lists.openembedded.org> wrote:
>
> Signed-off-by: alperak <alperyasinak1@gmail.com>
> ---
>  ...id-conversion-from-int-to-CURLoption.patch | 36 +++++++++++++++++++
>  .../recipes-support/curlpp/curlpp_0.8.1.bb    |  3 +-
>  2 files changed, 38 insertions(+), 1 deletion(-)
>  create mode 100644 meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch
>
> diff --git a/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch b/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch
> new file mode 100644
> index 000000000..1712a5346
> --- /dev/null
> +++ b/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch
> @@ -0,0 +1,36 @@
> +From ebe9144fdfdc8154661b93322cec4a1c43aa75ff Mon Sep 17 00:00:00 2001
> +From: alperak <alperyasinak1@gmail.com>
> +Date: Tue, 1 Oct 2024 19:45:38 +0300
> +Subject: [PATCH] Fix invalid conversion from int to CURLoption
> +
> +Options.hpp:281:74: error: invalid conversion from 'int' to 'CURLoption' [-fpermissive]
> +  281 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
> +      |                                                                          ^
> +      |                                                                          |
> +      |                                                                          int
> +
> +Fix invalid conversion by adding explicit cast to CURLoption
> +
> +Upstream-Status: Pending

Thanks for fixing this, I would suggest sending this patch upstream so
we get it reviewed.

> +
> +Signed-off-by: alperak <alperyasinak1@gmail.com>
> +---
> + include/curlpp/Options.hpp | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/include/curlpp/Options.hpp b/include/curlpp/Options.hpp
> +index c705c9d..7c9a501 100644
> +--- a/include/curlpp/Options.hpp
> ++++ b/include/curlpp/Options.hpp
> +@@ -278,7 +278,7 @@ namespace options
> +       typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_LIMIT> LowSpeedLimit;
> +       typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_TIME> LowSpeedTime;
> +       typedef curlpp::OptionTrait<long, CURLOPT_MAXCONNECTS> MaxConnects;
> +-      typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
> ++      typedef curlpp::OptionTrait<curl_closepolicy, (CURLoption)CURLOPT_CLOSEPOLICY> ClosePolicy;
> +       typedef curlpp::OptionTrait<bool, CURLOPT_FRESH_CONNECT> FreshConnect;
> +       typedef curlpp::OptionTrait<bool, CURLOPT_FORBID_REUSE> ForbidReuse;
> +       typedef curlpp::OptionTrait<long, CURLOPT_CONNECTTIMEOUT> ConnectTimeout;
> +--
> +2.25.1
> +
> diff --git a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
> index 131f1873a..cacdc9773 100644
> --- a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
> +++ b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
> @@ -8,7 +8,8 @@ DEPENDS = "curl"
>  DEPENDS:class-native = "curl-native"
>
>  SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https \
> -           file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch"
> +           file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch \
> +           file://0002-fix-invalid-conversion-from-int-to-CURLoption.patch"
>
>  SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
>
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#112636): https://lists.openembedded.org/g/openembedded-devel/message/112636
> Mute This Topic: https://lists.openembedded.org/mt/108763095/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch b/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch
new file mode 100644
index 000000000..1712a5346
--- /dev/null
+++ b/meta-networking/recipes-support/curlpp/curlpp/0002-fix-invalid-conversion-from-int-to-CURLoption.patch
@@ -0,0 +1,36 @@ 
+From ebe9144fdfdc8154661b93322cec4a1c43aa75ff Mon Sep 17 00:00:00 2001
+From: alperak <alperyasinak1@gmail.com>
+Date: Tue, 1 Oct 2024 19:45:38 +0300
+Subject: [PATCH] Fix invalid conversion from int to CURLoption
+
+Options.hpp:281:74: error: invalid conversion from 'int' to 'CURLoption' [-fpermissive]
+  281 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
+      |                                                                          ^
+      |                                                                          |
+      |                                                                          int
+
+Fix invalid conversion by adding explicit cast to CURLoption
+
+Upstream-Status: Pending
+
+Signed-off-by: alperak <alperyasinak1@gmail.com>
+---
+ include/curlpp/Options.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/curlpp/Options.hpp b/include/curlpp/Options.hpp
+index c705c9d..7c9a501 100644
+--- a/include/curlpp/Options.hpp
++++ b/include/curlpp/Options.hpp
+@@ -278,7 +278,7 @@ namespace options
+ 	typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_LIMIT> LowSpeedLimit;
+ 	typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_TIME> LowSpeedTime;
+ 	typedef curlpp::OptionTrait<long, CURLOPT_MAXCONNECTS> MaxConnects;
+-	typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
++	typedef curlpp::OptionTrait<curl_closepolicy, (CURLoption)CURLOPT_CLOSEPOLICY> ClosePolicy;
+ 	typedef curlpp::OptionTrait<bool, CURLOPT_FRESH_CONNECT> FreshConnect;
+ 	typedef curlpp::OptionTrait<bool, CURLOPT_FORBID_REUSE> ForbidReuse;
+ 	typedef curlpp::OptionTrait<long, CURLOPT_CONNECTTIMEOUT> ConnectTimeout;
+-- 
+2.25.1
+
diff --git a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
index 131f1873a..cacdc9773 100644
--- a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
+++ b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
@@ -8,7 +8,8 @@  DEPENDS = "curl"
 DEPENDS:class-native = "curl-native"
 
 SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https \
-           file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch"
+           file://0001-curlpp-config.in-Remove-references-to-absolute-build.patch \
+           file://0002-fix-invalid-conversion-from-int-to-CURLoption.patch"
 
 SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"