tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ACPICA userland utilities reenable support for NetBSD



In article <trinity-8d8c4fa1-6090-494c-af8b-aa799c13825c-1425829337013@3capp-mailcom-bs02>,
Kamil Rytarowski <n54%gmx.com@localhost> wrote:
>
>Error message:
>
>gcc -c -D_NetBSD -I../../../source/include -DACPI_ASL_COMPILER
>-I../../../source/compiler -Iobj -std=c99 -Wall
>-Wdeclaration-after-statement -Werror -Wformat=2 -Wmissing-declarations
>-Wmissing-prototypes -Wstrict-aliasing=0 -Wstrict-prototypes
>-Wswitch-default -Wpointer-arith -Wundef -Waddress -Waggregate-return
>-Winit-self -Winline -Wmissing-declarations -Wmissing-field-initializers
>-Wnested-externs -Wold-style-definition -Woverride-init
>-Wno-format-nonliteral -Wredundant-decls -Wempty-body -Wlogical-op
>-Wmissing-parameter-type -Wold-style-declaration -Wtype-limits
>-Wbad-function-cast -O2 -D_FORTIFY_SOURCE=2 -o obj/aslmapenter.o
>../../../source/compiler/aslmapenter.c
>In file included from ../../../source/include/acpi.h:130:0,
>                 from ../../../source/compiler/aslmapenter.c:116:
>../../../source/compiler/aslmapenter.c: In function 'MpCreateGpioInfo':
>../../../source/include/actypes.h:610:48: error: cast from function call
>of type 'char *' to non-matching type 'long unsigned int'
>[-Werror=bad-function-cast]
> #define ACPI_CAST_PTR(t, p)             ((t *) (ACPI_UINTPTR_T) (p))
>                                                ^
>../../../source/compiler/aslmapenter.c:298:12: note: in expansion of
>macro 'ACPI_CAST_PTR'
>     Info = ACPI_CAST_PTR (ACPI_GPIO_INFO,
>            ^
>../../../source/compiler/aslmapenter.c: In function 'MpCreateSerialInfo':
>../../../source/include/actypes.h:610:48: error: cast from function call
>of type 'char *' to non-matching type 'long unsigned int'
>[-Werror=bad-function-cast]
> #define ACPI_CAST_PTR(t, p)             ((t *) (ACPI_UINTPTR_T) (p))
>                                                ^
>../../../source/compiler/aslmapenter.c:374:12: note: in expansion of
>macro 'ACPI_CAST_PTR'
>     Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO,
>            ^
>cc1: all warnings being treated as errors
>
>Sources:
>
>source/include/platform/acnetbsd.h:#define ACPI_UINTPTR_T          uintptr_t
>source/include/actypes.h:#define ACPI_CAST_PTR(t, p)             ((t *)
>(ACPI_UINTPTR_T) (p))
>
>Can we resolve it in some better way?

Looks like it is fixed upstream:

https://github.com/juikim/acpica/commit/6b3cb49d82e77c7a86c9cce582b2645dc60c147a

>> 
>> |  filename=patch-source-os_specific-service_layers-osnetbsdtbl.c
>> 
>> Ok, how is ours different than FreeBSD's? Can we just make osbsdtbl.c?
>> 
>
>Yes it's an option.
>We are different only in the lack of kenv feature and different acpi
>root path in sysctl. I will do it.

Yes, an ifdef will do nicely for that... Perhaps merge them, call it
osbsdtbl.c and submit it upstream.

christos



Home | Main Index | Thread Index | Old Index