From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Mon, 20 Oct 2008 06:17:23 -0400 Subject: [U-Boot] FDT include file problems In-Reply-To: <20081020072341.BC464835697A@gemini.denx.de> References: <20081019220159.CB9F8835697A@gemini.denx.de> <20081020031023.GA18173@cideas.com> <20081020072341.BC464835697A@gemini.denx.de> Message-ID: <48FC5AB3.10302@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Jerry Van Baren, > > In message <20081020031023.GA18173@cideas.com> you wrote: >>> ... >>> In file included from /home/wd/git/u-boot/include/libfdt_env.h:33, >>> from fdt.c:51: >>> /usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include instead! > ... > >> Does this work better? > > Not really: [snip] >> diff --git a/include/libfdt_env.h b/include/libfdt_env.h >> index 671c3a8..728a248 100644 >> --- a/include/libfdt_env.h >> +++ b/include/libfdt_env.h >> @@ -33,10 +33,17 @@ >> #include > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > This has not changed? Oops, I was rushing too much. I missed changing this to endian.h. [snip] > If I change the code to include only for the U-Boot > code but use , I get warnings: > > ../include/libfdt.h:162: warning: implicit declaration of function '__swab32' > > and finally a "undefined reference to `__swab32'" error. Seems > __swab32 and __swab64 are defined only in linux/byteorder/swab.h > > Best regards, > > Wolfgang Denk ...and if I were not rushing so much, I would have found that myself instead of looking stupid. :-( Google hasn't been very helpful for answering the question of how to handle endian issues in userland (non-kernel) code. Hmmm. Grrr. Maybe I'm not asking it the right question. Maybe we need to make our own copy of linux/byteorder/swab.h in u-boot? That doesn't seem right. Best regards, gvb