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

build: Adjust for kernel mctp.h #2

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Nov 5, 2021

Starting 5.15 kernel has mctp.h as well and provides some of the
defintions, therefore move the ones we need to provide in this header
outside the conditional check so its always provided regardless of
header coming from kernel or not.

Include linux/if_link.h so it can pre-define IFLA_MCTP_UNSPEC and other
defines and there is a check for conditionally providing them here but
kernel does not have such a check, so if linux/if_link.h is included
after this header then we end up with duplicate defines

linux/if_link.h:1267:2: error: redefinition of enumerator 'IFLA_MCTP_UNSPEC'
IFLA_MCTP_UNSPEC,
^
../git/src/mctp.h:74:2: note: previous definition is here
IFLA_MCTP_UNSPEC,
^

Signed-off-by: Khem Raj raj.khem@gmail.com

Starting 5.15 kernel has mctp.h as well and provides some of the
defintions, therefore move the ones we need to provide in this header
outside the conditional check so its always provided regardless of
header coming from kernel or not.

Include linux/if_link.h so it can pre-define IFLA_MCTP_UNSPEC and other
defines and there is a check for conditionally providing them here but
kernel does not have such a check, so if linux/if_link.h is included
after this header then we end up with duplicate defines

linux/if_link.h:1267:2: error: redefinition of enumerator 'IFLA_MCTP_UNSPEC'
        IFLA_MCTP_UNSPEC,
        ^
../git/src/mctp.h:74:2: note: previous definition is here
        IFLA_MCTP_UNSPEC,
        ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
@jk-ozlabs jk-ozlabs merged commit 7888c09 into CodeConstruct:main Nov 16, 2021
@jk-ozlabs
Copy link
Member

Hi Khem,

Thanks for the PR, and for testing against the actual kernel headers! Looks good, merged.

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

Successfully merging this pull request may close these issues.

None yet

2 participants