On 01/13, Érico Nogueira Rolim via Tech-talk wrote:
> Just something to note if anyone wishes to use that post as reference (and the recent glibc support isn't enough). It mentions an issue with including kernel headers:
>
> > I ran into some #include hell with asm/termios.h, especially if I already had the normal termios.h included elsewhere, so you might have to copy relevant struct definitions into your own code if you can’t get it to work (I know, nasty!). The other thing to keep in mind is that the definition of NCCS might be different between your libc and kernel, so you need to make sure you’re using the kernel’s definition of NCCS. I believe asm/termbits.h has the correct NCCS and structures defined.
>
> The kernel docs explicitly recommend copying struct definitions into userspace code that uses syscalls/ioctls directly. That way you can be sure of what version is in use, and you can name structs appropriately in order to avoid any conflicts. This can get messy if the kernel definitions vary by architecture, and then violating that recommendation becomes more reasonable, so I hope that's not the case.
?? Sounds like a terrible idea to me. If kernel-related structs are
needed from userspace, the OS should provide appropriate header files
defining those that are either shared by userspace and kernelspace thus
ensuring that they're consistent, or, if separate sets for userspace and
kernelspace, are at least guaranteed to be consistent with each other.
Lewis
- Replies:
- Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- References:
- Configuration of the RGA200 communication baud rate LONG FENG via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Mark Rivers via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Johnson, Andrew N. via Tech-talk
- Re: Configuration of the RGA200 communication baud rate Érico Nogueira Rolim via Tech-talk
- Navigate by Date:
- Prev:
Re: Configuration of the RGA200 communication baud rate Érico Nogueira Rolim via Tech-talk
- Next:
Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
<2026>
- Navigate by Thread:
- Prev:
Re: Configuration of the RGA200 communication baud rate Érico Nogueira Rolim via Tech-talk
- Next:
Re: Configuration of the RGA200 communication baud rate Eric Norum via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
<2026>
|