Skip to content

Commit 00b6e3c

Browse files
committed
fix ossp uuid target folder
1 parent c8272b9 commit 00b6e3c

File tree

7 files changed

+55
-8
lines changed

7 files changed

+55
-8
lines changed
File renamed without changes.

config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export PYDK_PYTHON_HOST_PLATFORM=wasm32-${WASM_FLAVOUR}-emscripten
9191
# ============== wasi sdk ===============
9292

9393
# stable
94-
export WASI_SDK=${WASI_SDK:-23.0}
94+
export WASI_SDK=${WASI_SDK:-24.0}
9595
export WASI_SDK_MAJOR=$(echo ${WASI_SDK}|cut -d. -f1)
9696
export WASI_SDK_MINOR=$(echo ${WASI_SDK}|cut -d. -f2)
9797
export WASI_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_MAJOR}/wasi-sdk-${WASI_SDK}-$(arch)-linux.tar.gz

python-wasi-sdk.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export SDKROOT
1414
export CIVER=${CIVER:-$DISTRIB}
1515
export CI=true
1616

17-
if echo $0|grep -q python-wasm-sdk
17+
if echo $0|grep -q python-wasm-sdk\.sh
1818
then
1919
echo " * adding emsdk to wasm-sdk"
2020
emsdk=true
@@ -119,7 +119,9 @@ END
119119
then
120120
echo "keeping installed wasmtime and wasi binaries"
121121
else
122-
wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz -O-|xzcat|tar xfv -
122+
#wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz \
123+
wget https://github.com/bytecodealliance/wasmtime/releases/download/v23.0.2/wasmtime-v23.0.2-$(arch)-linux.tar.xz
124+
-O-|xzcat|tar xfv -
123125
mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin
124126
fi
125127

python-wasm-sdk.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export SDKROOT
1414
export CIVER=${CIVER:-$DISTRIB}
1515
export CI=true
1616

17-
if echo $0|grep -q python-wasm-sdk
17+
if echo $0|grep -q python-wasm-sdk\.sh
1818
then
1919
echo " * adding emsdk to wasm-sdk"
2020
emsdk=true
@@ -119,7 +119,9 @@ END
119119
then
120120
echo "keeping installed wasmtime and wasi binaries"
121121
else
122-
wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz -O-|xzcat|tar xfv -
122+
#wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz \
123+
wget https://github.com/bytecodealliance/wasmtime/releases/download/v23.0.2/wasmtime-v23.0.2-$(arch)-linux.tar.xz
124+
-O-|xzcat|tar xfv -
123125
mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin
124126
fi
125127

scripts/emsdk-fetch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ END
176176

177177
curl -fsSL https://bun.sh/install | bash
178178

179-
npm install --prefix $ROOT/emsdk/node/??.??.* -g pnpm@^8.0.0
179+
npm install --prefix $ROOT/emsdk/node/??.??.* -g pnpm@^9.0.0
180180

181181
# maybe rewrite that in python and move it to emcc.py
182182

sources.wasm/9000-uuid-ossp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ END
4141
mv $PREFIX/include/uuid.h $EMSDK/upstream/emscripten/cache/sysroot/include/ossp/
4242
cp -r $EMSDK/upstream/emscripten/cache/sysroot/include/ossp $PREFIX/include/
4343
mv $PREFIX/lib/libuuid.a $PREFIX/lib/libossp-uuid.a
44-
cp $PREFIX/lib/libossp-uuid.a $EMSDK/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/
44+
cp $PREFIX/lib/libossp-uuid.a $EMSDK/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic
4545
rm $PREFIX/lib/libuuid.la
4646
else
4747
echo "

wasisdk/hotfix/patch.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,16 @@ umask(mode_t mask) {
196196
// pwd.h
197197

198198
static int
199-
getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result) {
199+
//getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result) {
200+
getpwuid_r(uid_t uid, void *pwd, char *buf, size_t buflen, void **result) {
200201
return ENOENT;
201202
}
202203

203204

204205
static int
205206
kill(pid_t pid, int sig) {
206207
puts("nokill");
208+
return 0;
207209
}
208210

209211

@@ -256,5 +258,46 @@ setsockopt(int socket, int level, int option_name, const void *option_value, soc
256258

257259

258260

261+
#define SOCK_RAW 3
262+
#define SO_ERROR 0x1007
263+
264+
static struct servent *
265+
getservbyname(const char *name, const char *proto) {
266+
return NULL;
267+
}
268+
269+
static struct servent *
270+
getservbyport(int port, const char *proto) {
271+
return NULL;
272+
}
259273

274+
static struct protoent *
275+
getprotobyname(const char *name) {
276+
return NULL;
277+
}
278+
static struct hostent *
279+
gethostbyname(const char *name){
280+
return NULL;
281+
}
260282

283+
static struct hostent *
284+
gethostbyaddr(const void *addr, socklen_t len, int type) {
285+
return NULL;
286+
}
287+
288+
static struct protoent *
289+
getprotoent(void) {
290+
return NULL;
291+
}
292+
293+
static const char cc_hstrerror[] = "hstrerror";
294+
295+
static int * __h_errno_location(void){
296+
return NULL;
297+
}
298+
299+
static const char *
300+
hstrerror(int ecode)
301+
{
302+
return &cc_hstrerror[0];
303+
}

0 commit comments

Comments
 (0)