1
0
Fork 0
forked from fun/fun

Fixed compile error for Alpine/musl. (0.26.6)

This commit is contained in:
Johannes Findeisen 2025-10-13 00:50:42 +02:00
commit 6d9b082945
9 changed files with 8 additions and 56 deletions

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(fun VERSION 0.26.5 LANGUAGES C)
project(fun VERSION 0.26.6 LANGUAGES C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)

View file

@ -21,6 +21,13 @@
#ifdef __unix__
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/un.h>
#include <unistd.h>
#include <arpa/inet.h>
#endif
/* Threading internals (registry and platform glue) */

View file

@ -9,10 +9,6 @@
* Added: 2025-10-04
*/
#ifdef __unix__
#include <unistd.h>
#endif
case OP_SOCK_CLOSE: {
/* Pops fd; returns 1/0 */
Value fdv = pop_value(vm);

View file

@ -9,14 +9,6 @@
* Added: 2025-10-04
*/
#include <stdlib.h>
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
case OP_SOCK_RECV: {
/* Pops maxlen, fd; pushes data string ("" on EOF/error) */
Value maxv = pop_value(vm);

View file

@ -9,14 +9,6 @@
* Added: 2025-10-04
*/
#include <string.h>
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
case OP_SOCK_SEND: {
/* Pops data string, fd; pushes bytes sent (>=0) or -1 */
Value datav = pop_value(vm);

View file

@ -9,12 +9,6 @@
* Added: 2025-10-04
*/
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
case OP_SOCK_TCP_ACCEPT: {
/* Pops listen fd; pushes client fd (>0) or 0 */
Value fdv = pop_value(vm);

View file

@ -9,16 +9,6 @@
* Added: 2025-10-04
*/
#include <stdlib.h>
#include <string.h>
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#endif
case OP_SOCK_TCP_CONNECT: {
/* Pops port, host; pushes fd (>0) or 0 */
Value portv = pop_value(vm);

View file

@ -9,17 +9,6 @@
* Added: 2025-10-04
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#endif
case OP_SOCK_TCP_LISTEN: {
/* Pops backlog, port; pushes listen fd (>0) or 0 */
Value backlogv = pop_value(vm);

View file

@ -9,14 +9,6 @@
* Added: 2025-10-04
*/
#include <string.h>
#ifdef __unix__
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#endif
case OP_SOCK_UNIX_LISTEN: {
/* Pops backlog, path; returns listen fd (>0) or 0 */
Value backlogv = pop_value(vm);