summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-attr-getschedparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/pt-attr-getschedparam.c')
-rw-r--r--sysdeps/generic/pt-attr-getschedparam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-attr-getschedparam.c b/sysdeps/generic/pt-attr-getschedparam.c
index 25afebd0..190cf9d0 100644
--- a/sysdeps/generic/pt-attr-getschedparam.c
+++ b/sysdeps/generic/pt-attr-getschedparam.c
@@ -19,6 +19,7 @@
#include <pthread.h>
#include <sched.h>
+#include <string.h>
#include <pt-internal.h>
@@ -26,6 +27,6 @@ int
pthread_attr_getschedparam (const pthread_attr_t *attr,
struct sched_param *param)
{
- *param = attr->schedparam;
+ memcpy (param, &attr->schedparam, sizeof *param);
return 0;
}