Skip to contentSkip to conversation

rpi-userland: fix musl compile

PATCH New Sergio Prado 3 participants 4 messages Nov 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpi-userland: fix musl compile

When building with musl, the build fails with a conflicting type qualifier error.

This is because musl defines stdout and stderr as const pointers and RaspiVidYUV.c adds an extern declaration as normal pointers.

Since this declaration already comes in on the header (stdio.h), there is no need to add an extern declaration, so removes it.

Fixes:

http://autobuild.buildroot.net/results/27bd6f32cecdb4e7c95247c1feaf2732c1d8e3fa

---
 ...ting-type-qualifiers-errors-when-building.patch | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +23 -0
new file mode 100644
index 000000000000..4db60142c6ad
@@ -0,0 +1,23 @@
+Fix conflicting type qualifiers errors when building with musl.
+
+Signed-off-by: Sergio Prado <[email protected]>
+---
+ host_applications/linux/apps/raspicam/RaspiVidYUV.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/host_applications/linux/apps/raspicam/RaspiVidYUV.c b/host_applications/linux/apps/raspicam/RaspiVidYUV.c
+index b340d63c913f..13e6a6ccf5bf 100644
+--- a/host_applications/linux/apps/raspicam/RaspiVidYUV.c
++++ b/host_applications/linux/apps/raspicam/RaspiVidYUV.c
+@@ -106,8 +106,6 @@ const int ABORT_INTERVAL = 100; // ms
+ /// Run/record forever
+ #define WAIT_METHOD_FOREVER        4
+ 
+-extern FILE *stderr, *stdout;
+-
+ int mmal_status_to_int(MMAL_STATUS_T status);
+ static void signal_handler(int signal_number);
+ 
+-- 
+1.9.1
+
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 rpi-userland: fix musl compile

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sergio" == Sergio Prado <[email protected]> writes:

When building with musl, the build fails with a conflicting type qualifier error.

This is because musl defines stdout and stderr as const pointers and RaspiVidYUV.c adds an extern declaration as normal pointers.

Quoted 7 lines

Since this declaration already comes in on the header (stdio.h), there is no need to add an extern declaration, so removes it.

Fixes:

http://autobuild.buildroot.net/results/27bd6f32cecdb4e7c95247c1feaf2732c1d8e3fa

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 rpi-userland: fix musl compile

In reply to Sergio Prado

Hi Sergio,

Quoted 24 lines · Sergio Prado

When building with musl, the build fails with a conflicting type qualifier error.

This is because musl defines stdout and stderr as const pointers and RaspiVidYUV.c adds an extern declaration as normal pointers.

Since this declaration already comes in on the header (stdio.h), there is no need to add an extern declaration, so removes it.

Fixes:

http://autobuild.buildroot.net/results/27bd6f32cecdb4e7c95247c1feaf2732c1d8e3fa

---
 ...ting-type-qualifiers-errors-when-building.patch | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +0 -0
new file mode 100644
index 000000000000..4db60142c6ad

package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch line 3

Quoted 3 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +3 -0
@@ -0,0 +1,23 @@
+Fix conflicting type qualifiers errors when building with musl.
+
+Signed-off-by: Sergio Prado <[email protected]>

Did you send this patch upstream?

Regards,
Arnout

Quoted 21 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +20 -0
+---
+ host_applications/linux/apps/raspicam/RaspiVidYUV.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/host_applications/linux/apps/raspicam/RaspiVidYUV.c b/host_applications/linux/apps/raspicam/RaspiVidYUV.c
+index b340d63c913f..13e6a6ccf5bf 100644
+--- a/host_applications/linux/apps/raspicam/RaspiVidYUV.c
++++ b/host_applications/linux/apps/raspicam/RaspiVidYUV.c
+@@ -106,8 +106,6 @@ const int ABORT_INTERVAL = 100; // ms
+ /// Run/record forever
+ #define WAIT_METHOD_FOREVER        4
+ 
+-extern FILE *stderr, *stdout;
+-
+ int mmal_status_to_int(MMAL_STATUS_T status);
+ static void signal_handler(int signal_number);
+ 
+-- 
+1.9.1
+
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/1 rpi-userland: fix musl compile

Hi Arnout,

2015-11-27 18:50 GMT-02:00 Arnout Vandecappelle <[email protected]>:

Quoted 31 lines

Hi Sergio,

Quoted 12 lines · Sergio Prado

When building with musl, the build fails with a conflicting type qualifier error.

This is because musl defines stdout and stderr as const pointers and RaspiVidYUV.c adds an extern declaration as normal pointers.

Since this declaration already comes in on the header (stdio.h), there is no need to add an extern declaration, so removes it.

Fixes:

http://autobuild.buildroot.net/results/27bd6f32cecdb4e7c95247c1feaf2732c1d8e3fa

Quoted 3 lines
---
 ...ting-type-qualifiers-errors-when-building.patch | 23

++++++++++++++++++++++

Quoted 2 lines
 1 file changed, 23 insertions(+)
 create mode 100644

package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch

Quoted 2 lines

diff --git

a/package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch b/package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch

Quoted 4 lines

new file mode 100644
index 000000000000..4db60142c6ad
--- /dev/null
+++

Quoted 8 lines

b/package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch

package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch line 3

Quoted 4 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +3 -0
@@ -0,0 +1,23 @@
+Fix conflicting type qualifiers errors when building with musl.
+
+Signed-off-by: Sergio Prado <[email protected]>

Did you send this patch upstream?

I've just did: https://github.com/raspberrypi/userland/pull/272

Quoted 3 lines

Regards,
Arnout

Thanks!

Quoted 26 lines

package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch

Quoted 6 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +5 -0
+---
+ host_applications/linux/apps/raspicam/RaspiVidYUV.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/host_applications/linux/apps/raspicam/RaspiVidYUV.c

b/host_applications/linux/apps/raspicam/RaspiVidYUV.c

Quoted 6 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +5 -0
+index b340d63c913f..13e6a6ccf5bf 100644
+--- a/host_applications/linux/apps/raspicam/RaspiVidYUV.c
++++ b/host_applications/linux/apps/raspicam/RaspiVidYUV.c
+@@ -106,8 +106,6 @@ const int ABORT_INTERVAL = 100; // ms
+ /// Run/record forever

package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch line 23

Quoted 10 lines
package/rpi-userland/0006-Fix-conflicting-type-qualifiers-errors-when-building.patch new file +10 -0
+ #define WAIT_METHOD_FOREVER        4
+
+-extern FILE *stderr, *stdout;
+-
+ int mmal_status_to_int(MMAL_STATUS_T status);
+ static void signal_handler(int signal_number);
+
+--
+1.9.1
+

--

Quoted 7 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151127/84aab774/attachment.html>