summaryrefslogtreecommitdiffstats
path: root/tools/power/acpi/os_specific/service_layers/osunixxf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/power/acpi/os_specific/service_layers/osunixxf.c')
-rw-r--r--tools/power/acpi/os_specific/service_layers/osunixxf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c
index 8d8003c919d4..8f5ded83a249 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixxf.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c
@@ -646,8 +646,12 @@ acpi_os_create_semaphore(u32 max_units,
}
#ifdef __APPLE__
{
- char *semaphore_name = tmpnam(NULL);
+ static int semaphore_count = 0;
+ char semaphore_name[32];
+ snprintf(semaphore_name, sizeof(semaphore_name), "acpi_sem_%d",
+ semaphore_count++);
+ printf("%s\n", semaphore_name);
sem =
sem_open(semaphore_name, O_EXCL | O_CREAT, 0755,
initial_units);
OpenPOWER on IntegriCloud