mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-02 23:18:44 +00:00
Fix some build errors
This commit is contained in:
parent
7558549d44
commit
5b908bc756
8 changed files with 19 additions and 11 deletions
|
@ -726,6 +726,7 @@ void abort(void) wontreturn;
|
|||
#if __GNUC__ + 0 >= 9
|
||||
#pragma GCC diagnostic ignored /* "always true" breaks dce */ "-Waddress"
|
||||
#if __GNUC__ >= 11
|
||||
#pragma GCC diagnostic ignored /* annoying */ "-Wattributes"
|
||||
#pragma GCC diagnostic ignored /* orwellian */ "-Wold-style-definition"
|
||||
#endif /* GCC11+ */
|
||||
#endif /* GCC9+ */
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_VAESINTRIN_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_ISYSTEM_VAESINTRIN_INTERNAL_H_
|
||||
#include "third_party/intel/vaesintrin.internal.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_VAESINTRIN_INTERNAL_H_ */
|
|
@ -24,6 +24,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/cachesize.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
|
@ -505,14 +506,16 @@ dontinline int strcasecmp_pure(const char *a, const char *b) {
|
|||
return tolower(*a & 0xff) - tolower(*b & 0xff);
|
||||
}
|
||||
|
||||
char *randomize_buf2str(size_t size, char data[size]) {
|
||||
char *randomize_buf2str(size_t size, char *data) {
|
||||
assert(data);
|
||||
rngset(data, size, _rand64, -1);
|
||||
data[size - 1] = '\0';
|
||||
return data;
|
||||
}
|
||||
|
||||
char *longstringislong(size_t size, char data[size]) {
|
||||
char *longstringislong(size_t size, char *data) {
|
||||
unsigned i;
|
||||
assert(data);
|
||||
randomize_buf2str(size, data);
|
||||
for (i = 0; i < size; ++i) {
|
||||
data[i] |= 1u << (i & 5);
|
||||
|
|
3
third_party/intel/vaesintrin.internal.h
vendored
3
third_party/intel/vaesintrin.internal.h
vendored
|
@ -1,5 +1,8 @@
|
|||
/* clang-format off */
|
||||
#if defined(__x86_64__) && !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#ifndef _IMMINTRIN_H_INCLUDED
|
||||
# error "Never use <vaesintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
#ifndef __VAESINTRIN_H_INCLUDED
|
||||
#define __VAESINTRIN_H_INCLUDED
|
||||
#if !defined(__VAES__) || !defined(__AVX__)
|
||||
|
|
4
third_party/mbedtls/test/test_suite_ssl.c
vendored
4
third_party/mbedtls/test/test_suite_ssl.c
vendored
|
@ -91,7 +91,7 @@ void log_analyzer( void *ctx, int level,
|
|||
|
||||
/* Invalid minor version used when not specifying a min/max version or expecting a test to fail */
|
||||
#define TEST_SSL_MINOR_VERSION_NONE -1
|
||||
|
||||
s
|
||||
typedef struct handshake_test_options
|
||||
{
|
||||
const char *cipher;
|
||||
|
@ -2270,6 +2270,8 @@ void test_ssl_mock_sanity( )
|
|||
unsigned char received[MSGLEN];
|
||||
mbedtls_mock_socket socket;
|
||||
|
||||
memset(message, 0, sizeof(message));
|
||||
|
||||
mbedtls_mock_socket_init( &socket );
|
||||
TEST_ASSERT( mbedtls_mock_tcp_send_b( &socket, message, MSGLEN ) < 0 );
|
||||
mbedtls_mock_socket_close( &socket );
|
||||
|
|
4
third_party/musl/rand48.c
vendored
4
third_party/musl/rand48.c
vendored
|
@ -25,8 +25,8 @@
|
|||
│ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/rand48.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
@ -87,7 +87,7 @@ long mrand48(void)
|
|||
return jrand48(__seed48);
|
||||
}
|
||||
|
||||
unsigned short *seed48(unsigned short *s)
|
||||
unsigned short *seed48(unsigned short s[3])
|
||||
{
|
||||
static unsigned short p[3];
|
||||
memcpy(p, __seed48, sizeof p);
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "tool/build/lib/lines.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "tool/build/lib/lines.h"
|
||||
|
||||
struct Lines *NewLines(void) {
|
||||
return calloc(1, sizeof(struct Lines));
|
||||
|
@ -46,7 +47,8 @@ void AppendLines(struct Lines *lines, const char *s) {
|
|||
s = p + 1;
|
||||
} else {
|
||||
if (*s) {
|
||||
AppendLine(lines, s, -1);
|
||||
// gcc11 whines about SIZE_MAX > PTRDIFF_MAX
|
||||
AppendLine(lines, s, PTRDIFF_MAX);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
"__SSE2__"
|
||||
"__SSE3__"
|
||||
"__SSSE3__"
|
||||
"__SSE4A__"
|
||||
"__SSE4_1__"
|
||||
"__SSE4_2__"
|
||||
"__XSAVE__"
|
||||
|
|
Loading…
Add table
Reference in a new issue