Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9717 - Fix "warning: "htobe16" redefined"

Attached to Project: Rockbox
Opened by Akio Idehara (idak) - Friday, 26 December 2008, 23:34 GMT+2
Last edited by Nils Wallménius (nls) - Saturday, 24 January 2009, 11:17 GMT+2
Task Type Patches
Category Simulator
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

I think newer? SDL includes <endian.h>
(my fedora10's SDL version is 1.2.13),
and simulator build log says like the following.
---
warning: "htobe16" redefined
---
http://build.rockbox.org/showlog.cgi?date=20081226T160730Z&type=iAudio%20M3%20-%20Simulator#prob1
---
This patch fix it.
   fix_endian_warn.patch (0.7 KiB)
 firmware/export/system.h |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

This task depends upon

Closed by  Nils Wallménius (nls)
Saturday, 24 January 2009, 11:17 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed with funman's suggested change, thanks!
Comment by Rafaël Carré (funman) - Thursday, 08 January 2009, 08:06 GMT+2
You don't need to check if a symbol is defined before undefining it, simply use "#undef xxx"

However I think sdl.h should be checked to see if some macro can prevent inclusion of endian.h
Comment by Michael Sevakis (MikeS) - Thursday, 08 January 2009, 12:44 GMT+2
I think '#define _ENDIAN_H' somewhere before including headers would prevent it (as a -D_ENDIAN_H perhaps).
Comment by Akio Idehara (idak) - Thursday, 08 January 2009, 15:40 GMT+2
I think -D_ENDIAN_H is not good, because endian.h defines other thins like "__BYTE_ORDER".
And if it doesn't defined, a lot of error is printed.

   fix_endian_warn02.patch (0.6 KiB)
 firmware/export/system.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

Comment by Rafaël Carré (funman) - Saturday, 10 January 2009, 00:17 GMT+2
If it's enclosed into #ifdef SIMULATOR (because only the sim use SDL) I think this should be good.

Michael what do you think ?

Loading...