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

Fix openssl build failure for AARCH64_GCC #2862

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

htafr
Copy link
Contributor

@htafr htafr commented Oct 16, 2024

Trying to compile with toolchain AARCH64_GCC generates the following error:

$WORKSPACE/libspdm/os_stub/openssllib/openssl/crypto/o_str.c: In function ‘openssl_strerror_r’:
$WORKSPACE/libspdm/os_stub/openssllib/openssl/crypto/o_str.c:329:13: error: implicit declaration of function ‘strerror_r’; did you mean ‘strerror’? [-Werror=implicit-function-declaration]
  329 |     return !strerror_r(errnum, buf, buflen);
      |             ^~~~~~~~~~

Fix: just add the flag -std=c11 in OPENSSL_FLAGS for AARCH64_GCC.

Signed-off-by: htafr <htafreit@gmail.com>
@steven-bellock
Copy link
Contributor

The code in question is

#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
      (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
    /*
     * We can use "real" strerror_r. The OpenSSL version differs in that it
     * gives 1 on success and 0 on failure for consistency with other OpenSSL
     * functions. Real strerror_r does it the other way around
     */
    return !strerror_r(errnum, buf, buflen);

@steven-bellock steven-bellock added the build Build system label Oct 16, 2024
@jyao1 jyao1 merged commit 5149b56 into DMTF:main Oct 17, 2024
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants