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

Commits on Nov 1, 2023

  1. issue: Fix inline function redefinition with clang

    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]>
    pasis committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    6c79d99 View commit details
    Browse the repository at this point in the history
  2. issue: Use system gettid() with glibc-2.30+

    This fixes compilation error on a system with glibc-2.30 or higher.
    
    Signed-off-by: Dmytro Podgornyi <[email protected]>
    pasis committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    a997e63 View commit details
    Browse the repository at this point in the history
  3. issue: Avoid gcc extension in a struct definition

    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]>
    pasis committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    0d40106 View commit details
    Browse the repository at this point in the history
  4. issue: Fix unused-but-set-variable warnings with clang

    Signed-off-by: Dmytro Podgornyi <[email protected]>
    pasis committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    eff15d0 View commit details
    Browse the repository at this point in the history
  5. issue: Fix clang analyzer warnings

    Suppress "dead nested assignment" warnings.
    
    Signed-off-by: Dmytro Podgornyi <[email protected]>
    pasis committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    077eab6 View commit details
    Browse the repository at this point in the history