Skip to content

Commit

Permalink
Fix Wasm backend compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Sep 21, 2023
1 parent 94e35eb commit 884fe05
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Backends/System/Wasm/Sources/GL/gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ typedef char GLchar;
#define GL_INT 0x1404
#define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_MAX_VERTEX_ATTRIBS 0x8869

__attribute__((import_module("imports"), import_name("glUniform1i"))) void glUniform1i(GLint location, GLint v0);
__attribute__((import_module("imports"), import_name("glUniform2i"))) void glUniform2i(GLint location, GLint v0, GLint v1);
Expand Down
1 change: 1 addition & 0 deletions Sources/kinc/network/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ KINC_FUNC unsigned kinc_url_to_int(const char *url, int port);
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>

#if defined(KORE_WINDOWS) || defined(KORE_WINDOWSAPP)

Expand Down
3 changes: 3 additions & 0 deletions miniClib/errno.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

#define errno 0
4 changes: 4 additions & 0 deletions miniClib/stdlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ int abs(int n) {
return n < 0 ? -n : n;
}

long long int llabs(long long int n) {
return n < 0 ? -n : n;
}

void qsort(void *base, size_t num, size_t size, int (*compar)(const void*,const void*)) {

}
2 changes: 2 additions & 0 deletions miniClib/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ long int strtol(const char *str, char **endptr, int base);

int abs(int n);

long long int llabs(long long int n);

void qsort(void *base, size_t num, size_t size, int (*compar)(const void *, const void *));

#ifdef __cplusplus
Expand Down

0 comments on commit 884fe05

Please sign in to comment.