Skip to content

Commit 71c6670

Browse files
committed
platform fixes
1 parent 2ddd019 commit 71c6670

4 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/amalgam.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
#include "platform/windows/path.c"
143143
#include "platform/windows/rpath_fixer.c"
144144
#include "platform/windows/run_cmd.c"
145-
#include "platform/windows/socket.c"
146145
#include "platform/windows/term.c"
147146
#include "platform/windows/timer.c"
148147
#include "platform/windows/uname.c"
@@ -155,11 +154,11 @@
155154
#include "platform/posix/os.c"
156155
#include "platform/posix/path.c"
157156
#include "platform/posix/run_cmd.c"
158-
#include "platform/posix/socket.c"
159157
#include "platform/posix/term.c"
160158
#include "platform/posix/timer.c"
161159
#include "platform/posix/uname.c"
162160
#endif
161+
#include "platform/null/socket.c"
163162

164163
#include "external/pkgconfig.c"
165164
#include "external/pkgconfig_exec.c"

src/platform/filesystem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ fs_write(int fd, const void *buf_v, uint32_t len)
368368
{
369369
const char *buf = buf_v;
370370
while (len > 0) {
371-
ssize_t w = write(fd, buf, len);
371+
int64_t w = write(fd, buf, len);
372372
if (w < 0) {
373373
if (errno == EINTR) {
374374
continue;

src/platform/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,9 @@ if platform == 'posix'
6868
else
6969
platform_sources += files('null/backtrace.c')
7070
endif
71+
72+
if host_machine.system() == 'sunos'
73+
deps += cc.find_library('socket')
74+
deps += cc.find_library('nsl')
75+
endif
7176
endif

src/platform/null/socket.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
3+
* SPDX-License-Identifier: GPL-3.0-only
4+
*/
5+
6+
#include "compat.h"
7+
8+
#include "log.h"
9+
#include "platform/socket.h"
10+
11+
bool
12+
socket_pair_create(const char *path, struct socket_pair *pair)
13+
{
14+
LOG_E("socket_pair_create: not implemented");
15+
return false;
16+
}

0 commit comments

Comments
 (0)