diff options
author | Lv Zheng <zetalog@gmail.com> | 2016-10-17 15:03:01 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-10-20 19:33:39 -0400 |
commit | b97acdf1b0cd493a8abff703f0674b471bf105b1 (patch) | |
tree | 570a335585004be1885e9a678fcc150eaa694804 | |
parent | 6c9fd7eda78d0a153f9f57c44dc8761adc2cd501 (diff) |
ACPICA: MacOSX: Fix wrong sem_destroy definition
ACPICA commit bbcb58f7875381d5c7f3d614bad3bc628a3f5cc6
The following build errors can be seen for MacOSX builds:
.../osunixxf.c:882:9: error: 'sem_close' is deprecated [-Werror,-Wdeprecated-declarations]
.../acmacosx.h:122:29: note: expanded from macro 'sem_destroy'
#define sem_destroy sem_close
sem_destroy() issue is caused by the wrong order of the following lines:
#define #sem_destroy sem_close
#include <semaphore.h>
This patch fixes it by removing the buggy re-definitiion. Lv Zheng.
Linux is not affected by this change.
Link: https://github.com/acpica/acpica/commit/bbcb58f7
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | tools/power/acpi/os_specific/service_layers/osunixxf.c | 7 |
1 files changed, 6 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 8f5ded83a249..10648aaf6164 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixxf.c +++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c | |||
@@ -696,10 +696,15 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle) | |||
696 | if (!sem) { | 696 | if (!sem) { |
697 | return (AE_BAD_PARAMETER); | 697 | return (AE_BAD_PARAMETER); |
698 | } | 698 | } |
699 | 699 | #ifdef __APPLE__ | |
700 | if (sem_close(sem) == -1) { | ||
701 | return (AE_BAD_PARAMETER); | ||
702 | } | ||
703 | #else | ||
700 | if (sem_destroy(sem) == -1) { | 704 | if (sem_destroy(sem) == -1) { |
701 | return (AE_BAD_PARAMETER); | 705 | return (AE_BAD_PARAMETER); |
702 | } | 706 | } |
707 | #endif | ||
703 | 708 | ||
704 | return (AE_OK); | 709 | return (AE_OK); |
705 | } | 710 | } |