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

issue: Fix compilation with clang #1051

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

issue: Fix compilation with clang #1051

wants to merge 5 commits into from

Conversation

pasis
Copy link
Member

@pasis pasis commented Nov 1, 2023

Description

Fix compilation errors and warnings with clang.

What

Fix compilation errors and warnings with clang.

Why ?

Compilation issues.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

pasis added 5 commits November 2, 2023 00:08
sock-redirect implements read(), recv(), etc with intention to override
them. However, some versions of glibc provide "fortified" calls. This is
implemented by making regular symbols as inline wrappers on top of
__read_chk() or similar.

gcc allows to redefine such inline wrappers with specific attributes,
but clang fails with an error.

As a workaround for clang, rename glibc wrappers on the preprocessing
stage.

Signed-off-by: Dmytro Podgornyi <[email protected]>
This fixes compilation error on a system with glibc-2.30 or higher.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Clang doesn't allow variable sized type not at the end of a struct
claiming this is a GNU extension. Make a union instead of adding an
array after the variable sized field.

This fixes vmad compilation with clang.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Suppress "dead nested assignment" warnings.

Signed-off-by: Dmytro Podgornyi <[email protected]>
@swx-jenkins5
Copy link

Can one of the admins verify this patch?

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.

2 participants