Commit 2033f45b by Rainer Orth Committed by Rainer Orth

Fix Solaris build with OpenMP 5.0

	* affinity.c: Include <string.h>, <stdio.h>.
	(gomp_display_affinity_place): Remove cpusetp.
	* teams.c: Include <limits.h>.

From-SVN: r265938
parent 8991d779
2018-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* affinity.c: Include <string.h>, <stdio.h>.
(gomp_display_affinity_place): Remove cpusetp.
* teams.c: Include <limits.h>.
2018-11-08 Jakub Jelinek <jakub@redhat.com> 2018-11-08 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c-c++-common/task-reduction-8.c (bar): Add * testsuite/libgomp.c-c++-common/task-reduction-8.c (bar): Add
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
/* This is a generic stub implementation of a CPU affinity setting. */ /* This is a generic stub implementation of a CPU affinity setting. */
#include "libgomp.h" #include "libgomp.h"
#include <string.h>
#include <stdio.h>
void void
gomp_init_affinity (void) gomp_init_affinity (void)
...@@ -142,7 +144,6 @@ void ...@@ -142,7 +144,6 @@ void
gomp_display_affinity_place (char *buffer, size_t size, size_t *ret, gomp_display_affinity_place (char *buffer, size_t size, size_t *ret,
int place) int place)
{ {
cpu_set_t *cpusetp;
char buf[sizeof (long) * 3 + 4]; char buf[sizeof (long) * 3 + 4];
if (gomp_available_cpus > 1) if (gomp_available_cpus > 1)
sprintf (buf, "0-%lu", gomp_available_cpus - 1); sprintf (buf, "0-%lu", gomp_available_cpus - 1);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
/* This file handles the host TEAMS construct. */ /* This file handles the host TEAMS construct. */
#include "libgomp.h" #include "libgomp.h"
#include <limits.h>
static unsigned gomp_num_teams = 1, gomp_team_num = 0; static unsigned gomp_num_teams = 1, gomp_team_num = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment