diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index 762dfedd0..ce1aa7019 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -43,6 +43,10 @@ typedef unsigned short __uid_t; typedef unsigned short __gid_t; #endif +#ifndef __machine_id_t_defined +typedef __uint32_t __id_t; +#endif + #ifndef __machine_off64_t_defined __extension__ typedef long long _off64_t; #endif diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 316ee9ac4..d093578c7 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -134,6 +134,11 @@ typedef char * caddr_t; #define __caddr_t_defined #endif +#ifndef _ID_T_DECLARED +typedef __id_t id_t; /* can hold a uid_t or pid_t */ +#define _ID_T_DECLARED +#endif + #ifndef __CYGWIN__ #if defined(__MS_types__) || defined(__rtems__) || \ defined(__sparc__) || defined(__SPU__) diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index f9ed4b66d..bfffc5dbe 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -65,12 +65,6 @@ typedef __uint32_t __ino32_t; typedef __uint64_t ino_t; #endif /*__ino_t_defined*/ -/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */ -#ifndef __id_t_defined -#define __id_t_defined -typedef __uint32_t id_t; -#endif /* __id_t_defined */ - #if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__) struct __flock32 { short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */