Add __nl_item to <sys/_types.h>

Message ID 20180823125128.14784-1-sebastian.huber@embedded-brains.de
State New
Headers show
Series
  • Add __nl_item to <sys/_types.h>
Related show

Commit Message

Sebastian Huber Aug. 23, 2018, 12:51 p.m.
Add __nl_item to <sys/_types.h> for FreeBSD compatibility.  This type is
used by some FreeBSD user-space header files.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

---
 newlib/libc/include/sys/_types.h | 1 +
 1 file changed, 1 insertion(+)

-- 
2.13.7

Comments

Corinna Vinschen Aug. 23, 2018, 1:47 p.m. | #1
On Aug 23 14:51, Sebastian Huber wrote:
> Add __nl_item to <sys/_types.h> for FreeBSD compatibility.  This type is

> used by some FreeBSD user-space header files.

> 

> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

> ---

>  newlib/libc/include/sys/_types.h | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h

> index d8e8c0b52..fc10531d5 100644

> --- a/newlib/libc/include/sys/_types.h

> +++ b/newlib/libc/include/sys/_types.h

> @@ -210,6 +210,7 @@ typedef	__uint8_t	__sa_family_t;

>  typedef	__uint32_t	__socklen_t;

>  #endif

>  

> +typedef	int		__nl_item;


This collides with

newlib/libc/include/langinfo.h:44:enum __nl_item


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
Sebastian Huber Aug. 23, 2018, 1:50 p.m. | #2
On 23/08/18 15:47, Corinna Vinschen wrote:
> On Aug 23 14:51, Sebastian Huber wrote:

>> Add __nl_item to <sys/_types.h> for FreeBSD compatibility.  This type is

>> used by some FreeBSD user-space header files.

>>

>> Signed-off-by: Sebastian Huber<sebastian.huber@embedded-brains.de>

>> ---

>>   newlib/libc/include/sys/_types.h | 1 +

>>   1 file changed, 1 insertion(+)

>>

>> diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h

>> index d8e8c0b52..fc10531d5 100644

>> --- a/newlib/libc/include/sys/_types.h

>> +++ b/newlib/libc/include/sys/_types.h

>> @@ -210,6 +210,7 @@ typedef	__uint8_t	__sa_family_t;

>>   typedef	__uint32_t	__socklen_t;

>>   #endif

>>   

>> +typedef	int		__nl_item;

> This collides with

>

> newlib/libc/include/langinfo.h:44:enum __nl_item


Oh, this is bad. Thanks for spotting this issue.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Patch

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index d8e8c0b52..fc10531d5 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -210,6 +210,7 @@  typedef	__uint8_t	__sa_family_t;
 typedef	__uint32_t	__socklen_t;
 #endif
 
+typedef	int		__nl_item;
 typedef	unsigned short	__nlink_t;
 typedef	long		__suseconds_t;	/* microseconds (signed) */
 typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */