[PATCH] Cygwin: Add missing Linux #define of CPU_SETSIZE

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Cygwin: Add missing Linux #define of CPU_SETSIZE

Mark Geisert
Though our implementation of cpu sets doesn't need it, software from
Linux environments expects this definition to be present.  It's
documented on the Linux CPU_SET(3) man page but was left out due to
oversight.

Addresses https://cygwin.com/ml/cygwin/2019-12/msg00248.html

---
 winsup/cygwin/include/sys/cpuset.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h
index 1adf48d54..572565165 100644
--- a/winsup/cygwin/include/sys/cpuset.h
+++ b/winsup/cygwin/include/sys/cpuset.h
@@ -89,6 +89,7 @@ int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *);
 #define CPU_XOR(dst, src1, src2)  CPU_XOR_S(sizeof (cpu_set_t), dst, src1, src2)
 #define CPU_EQUAL(src1, src2)     CPU_EQUAL_S(sizeof (cpu_set_t), src1, src2)
 
+#define CPU_SETSIZE               __CPU_SETSIZE
 #endif /* __GNU_VISIBLE */
 
 #ifdef __cplusplus
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Add missing Linux #define of CPU_SETSIZE

Corinna Vinschen-2
On Dec 22 22:45, Mark Geisert wrote:

> Though our implementation of cpu sets doesn't need it, software from
> Linux environments expects this definition to be present.  It's
> documented on the Linux CPU_SET(3) man page but was left out due to
> oversight.
>
> Addresses https://cygwin.com/ml/cygwin/2019-12/msg00248.html
>
> ---
>  winsup/cygwin/include/sys/cpuset.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h
> index 1adf48d54..572565165 100644
> --- a/winsup/cygwin/include/sys/cpuset.h
> +++ b/winsup/cygwin/include/sys/cpuset.h
> @@ -89,6 +89,7 @@ int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *);
>  #define CPU_XOR(dst, src1, src2)  CPU_XOR_S(sizeof (cpu_set_t), dst, src1, src2)
>  #define CPU_EQUAL(src1, src2)     CPU_EQUAL_S(sizeof (cpu_set_t), src1, src2)
>  
> +#define CPU_SETSIZE               __CPU_SETSIZE
>  #endif /* __GNU_VISIBLE */
>  
>  #ifdef __cplusplus
> --
> 2.21.0
Pushed.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment