All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3
@ 2022-07-14  9:36 Fabrice Fontaine
  2022-07-16 22:06 ` Yann E. MORIN
  2022-08-04 15:03 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-07-14  9:36 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Fabrice Fontaine

Fix the following build failure with musl 1.2.3:

ola/AutoStart.cpp: In function 'ola::network::TCPSocket* ola::client::ConnectToServer(short unsigned int)':
ola/AutoStart.cpp:116:12: error: invalid cast from type 'std::nullptr_t' to type 'char*'
  116 |            reinterpret_cast<char*>(NULL));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/88be323e64f66433cabc962e719307b5fb6a6177

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-ola-fix-compilation-with-musl-1-2-3.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch

diff --git a/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch b/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch
new file mode 100644
index 0000000000..f236ef0957
--- /dev/null
+++ b/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch
@@ -0,0 +1,35 @@
+From eb31017284f9a1c95602a9c06d606df6b558a691 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 14 Apr 2022 17:39:32 -0700
+Subject: [PATCH] ola: fix compilation with musl 1.2.3
+
+musl 1.2.3 defines NULL as nullptr. cannot use reinterpret_cast with
+nullptr.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+[Retrieved from:
+https://github.com/OpenLightingProject/ola/pull/1773/commits/eb31017284f9a1c95602a9c06d606df6b558a691]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ ola/AutoStart.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ola/AutoStart.cpp b/ola/AutoStart.cpp
+index 89fa51f115..4dbe20d317 100644
+--- a/ola/AutoStart.cpp
++++ b/ola/AutoStart.cpp
+@@ -110,11 +110,11 @@ TCPSocket *ConnectToServer(unsigned short port) {
+     // Try to start the server, we pass --daemon (fork into background) and
+     // --syslog (log to syslog).
+     execlp("olad", "olad", "--daemon", "--syslog",
+-#ifdef __FreeBSD__
+-           reinterpret_cast<char*>(0));
++#if __cplusplus >= 201103L
++           nullptr);
+ #else
+            reinterpret_cast<char*>(NULL));
+-#endif  // __FreeBSD__
++#endif  // __cplusplus >= 201103L
+     OLA_WARN << "Failed to exec: " << strerror(errno);
+     _exit(1);
+   }
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3
  2022-07-14  9:36 [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3 Fabrice Fontaine
@ 2022-07-16 22:06 ` Yann E. MORIN
  2022-08-04 15:03 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-07-16 22:06 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Julien Olivain, buildroot

Fabrice, All,

On 2022-07-14 11:36 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure with musl 1.2.3:
> 
> ola/AutoStart.cpp: In function 'ola::network::TCPSocket* ola::client::ConnectToServer(short unsigned int)':
> ola/AutoStart.cpp:116:12: error: invalid cast from type 'std::nullptr_t' to type 'char*'
>   116 |            reinterpret_cast<char*>(NULL));
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/88be323e64f66433cabc962e719307b5fb6a6177
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...-ola-fix-compilation-with-musl-1-2-3.patch | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch
> 
> diff --git a/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch b/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch
> new file mode 100644
> index 0000000000..f236ef0957
> --- /dev/null
> +++ b/package/ola/0001-ola-fix-compilation-with-musl-1-2-3.patch
> @@ -0,0 +1,35 @@
> +From eb31017284f9a1c95602a9c06d606df6b558a691 Mon Sep 17 00:00:00 2001
> +From: Rosen Penev <rosenp@gmail.com>
> +Date: Thu, 14 Apr 2022 17:39:32 -0700
> +Subject: [PATCH] ola: fix compilation with musl 1.2.3
> +
> +musl 1.2.3 defines NULL as nullptr. cannot use reinterpret_cast with
> +nullptr.
> +
> +Signed-off-by: Rosen Penev <rosenp@gmail.com>
> +[Retrieved from:
> +https://github.com/OpenLightingProject/ola/pull/1773/commits/eb31017284f9a1c95602a9c06d606df6b558a691]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + ola/AutoStart.cpp | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/ola/AutoStart.cpp b/ola/AutoStart.cpp
> +index 89fa51f115..4dbe20d317 100644
> +--- a/ola/AutoStart.cpp
> ++++ b/ola/AutoStart.cpp
> +@@ -110,11 +110,11 @@ TCPSocket *ConnectToServer(unsigned short port) {
> +     // Try to start the server, we pass --daemon (fork into background) and
> +     // --syslog (log to syslog).
> +     execlp("olad", "olad", "--daemon", "--syslog",
> +-#ifdef __FreeBSD__
> +-           reinterpret_cast<char*>(0));
> ++#if __cplusplus >= 201103L
> ++           nullptr);
> + #else
> +            reinterpret_cast<char*>(NULL));
> +-#endif  // __FreeBSD__
> ++#endif  // __cplusplus >= 201103L
> +     OLA_WARN << "Failed to exec: " << strerror(errno);
> +     _exit(1);
> +   }
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3
  2022-07-14  9:36 [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3 Fabrice Fontaine
  2022-07-16 22:06 ` Yann E. MORIN
@ 2022-08-04 15:03 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-08-04 15:03 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Julien Olivain, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with musl 1.2.3:
 > ola/AutoStart.cpp: In function 'ola::network::TCPSocket* ola::client::ConnectToServer(short unsigned int)':
 > ola/AutoStart.cpp:116:12: error: invalid cast from type 'std::nullptr_t' to type 'char*'
 >   116 |            reinterpret_cast<char*>(NULL));
 >       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/88be323e64f66433cabc962e719307b5fb6a6177

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-04 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14  9:36 [Buildroot] [PATCH 1/1] package/ola: fix build with musl 1.2.3 Fabrice Fontaine
2022-07-16 22:06 ` Yann E. MORIN
2022-08-04 15:03 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.