From: Pauli Date: Thu, 28 Mar 2019 05:02:19 +0000 (+1000) Subject: Fix test builds. X-Git-Tag: openssl-3.0.0-alpha1~2298 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a9e34e9ef103835d73683945cdf4606613c1b89b;p=oweals%2Fopenssl.git Fix test builds. /usr/include/bits/waitstatus.h includes endian.h under some libc's. This clashes with the new test header file, so rename the latter. Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/8600) --- diff --git a/test/endian.h b/test/endian.h deleted file mode 100644 index 0bcec047e6..0000000000 --- a/test/endian.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the Apache License 2.0 (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_INTERNAL_ENDIAN_H -# define HEADER_INTERNAL_ENDIAN_H - -# define DECLARE_IS_ENDIAN \ - const union { \ - long one; \ - char little; \ - } ossl_is_endian = { 1 } - -# define IS_LITTLE_ENDIAN (ossl_is_endian.little != 0) -# define IS_BIG_ENDIAN (ossl_is_endian.little == 0) - -#endif diff --git a/test/ossl_test_endian.h b/test/ossl_test_endian.h new file mode 100644 index 0000000000..0bcec047e6 --- /dev/null +++ b/test/ossl_test_endian.h @@ -0,0 +1,22 @@ +/* + * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_INTERNAL_ENDIAN_H +# define HEADER_INTERNAL_ENDIAN_H + +# define DECLARE_IS_ENDIAN \ + const union { \ + long one; \ + char little; \ + } ossl_is_endian = { 1 } + +# define IS_LITTLE_ENDIAN (ossl_is_endian.little != 0) +# define IS_BIG_ENDIAN (ossl_is_endian.little == 0) + +#endif diff --git a/test/params_api_test.c b/test/params_api_test.c index c99af3d58b..15dfb16f2a 100644 --- a/test/params_api_test.c +++ b/test/params_api_test.c @@ -11,7 +11,7 @@ #include #include "testutil.h" #include "internal/nelem.h" -#include "endian.h" +#include "ossl_test_endian.h" #include #include