Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/src/boot/efi/console.c:27:3: error: conflicting types for EFI_KEY_STATE #19004

Closed
tpgxyz opened this issue Mar 14, 2021 · 3 comments · Fixed by #18987
Closed

/src/boot/efi/console.c:27:3: error: conflicting types for EFI_KEY_STATE #19004

tpgxyz opened this issue Mar 14, 2021 · 3 comments · Fixed by #18987

Comments

@tpgxyz
Copy link
Contributor

tpgxyz commented Mar 14, 2021

systemd version the issue has been seen with

247

Used distribution

OpenMandriva 4.2

Linux kernel version used (uname -a)

5.11.1

CPU architecture issue was seen on

x86_64

Expected behaviour you didn't see

Compiles without error

Unexpected behaviour you saw

Does not compile

Steps to reproduce the problem

update gnu-efi to 3.0.13 release, and rebuild systemd

Additional program output to the terminal or log subsystem illustrating the issue

Here are the output logs:

FAILED: src/boot/efi/console.c.o 
gcc -c ../src/boot/efi/console.c -o src/boot/efi/console.c.o -Wall -Wextra -std=gnu90 -nostdinc -fpic -fshort-wchar -ffreestanding -fno-strict-aliasing -fno-stack-protector -Wsign-compare -Wno-missing-field-initializers -isystem /usr/include/efi -isystem /usr/include/efi/x86_64 -include src/boot/efi/efi_config.h -include version.h -mno-red-zone -mno-sse -mno-mmx -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -O2
../src/boot/efi/console.c:12: warning: "EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID" redefined
   12 | #define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
      | 
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:22: note: this is the location of the previous definition
   22 | #define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
      | 
../src/boot/efi/console.c:27:3: error: conflicting types for ‘EFI_KEY_STATE’
   27 | } EFI_KEY_STATE;
      |   ^~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:32:3: note: previous declaration of ‘EFI_KEY_STATE’ was here
   32 | } EFI_KEY_STATE;
      |   ^~~~~~~~~~~~~
../src/boot/efi/console.c:32:3: error: conflicting types for ‘EFI_KEY_DATA’
   32 | } EFI_KEY_DATA;
      |   ^~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:37:3: note: previous declaration of ‘EFI_KEY_DATA’ was here
   37 | } EFI_KEY_DATA;
      |   ^~~~~~~~~~~~
../src/boot/efi/console.c:34:29: error: conflicting types for ‘EFI_INPUT_READ_KEY_EX’
   34 | typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)(
      |                             ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:68:10: note: previous declaration of ‘EFI_INPUT_READ_KEY_EX’ was here
   68 | (EFIAPI *EFI_INPUT_READ_KEY_EX) (
      |          ^~~~~~~~~~~~~~~~~~~~~
../src/boot/efi/console.c:44:29: error: conflicting types for ‘EFI_KEY_NOTIFY_FUNCTION’
   44 | typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:82:10: note: previous declaration of ‘EFI_KEY_NOTIFY_FUNCTION’ was here
   82 | (EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
      |          ^~~~~~~~~~~~~~~~~~~~~~~
../src/boot/efi/console.c:48:29: error: conflicting types for ‘EFI_REGISTER_KEYSTROKE_NOTIFY’
   48 | typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:88:10: note: previous declaration of ‘EFI_REGISTER_KEYSTROKE_NOTIFY’ was here
   88 | (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/boot/efi/console.c:60:16: error: redefinition of ‘struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL’
   60 | typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:102:16: note: originally defined here
  102 | typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/boot/efi/console.c:67:3: error: conflicting types for ‘EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL’
   67 | } EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:63,
                 from ../src/boot/efi/console.c:3:
/usr/include/efi/eficonex.h:109:3: note: previous declaration of ‘EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL’ was here
  109 | } EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/efi/efi.h:42,
                 from ../src/boot/efi/console.c:3:
../src/boot/efi/console.c: In function ‘console_key_read’:
../src/boot/efi/console.c:93:74: warning: passing argument 1 of ‘TextInputEx->ReadKeyStrokeEx’ from incompatible pointer type [-Wincompatible-pointer-types]
   93 |                 err = uefi_call_wrapper(TextInputEx->ReadKeyStrokeEx, 2, TextInputEx, &keydata);
      |                                                                          ^~~~~~~~~~~
      |                                                                          |
      |                                                                          EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * {aka struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *}
../src/boot/efi/console.c:93:74: note: expected ‘struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *’ but argument is of type ‘EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *’ {aka ‘struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *’}
@bluca
Copy link
Member

bluca commented Mar 14, 2021

Already fixed by #18987

@bluca
Copy link
Member

bluca commented Mar 14, 2021

backport for stable-247 systemd/systemd-stable#97

@tpgxyz
Copy link
Contributor Author

tpgxyz commented Mar 14, 2021

@bluca Thanks it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants