]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
bsdsocket: expose Unix target hooks
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 22 May 2026 14:13:07 +0000 (07:13 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 2 Jun 2026 23:01:44 +0000 (16:01 -0700)
Add the shared declarations needed for a Unix bsdsocket.library target
backend.

include/bsdsocket.h

index 5fbe31d9d15c353f77f310393a9a57f2190c4394..d59ce3f958798be087a791f9fdfdd1d5bb7f9c02 100644 (file)
@@ -17,6 +17,8 @@
 
 extern int log_bsd;
 
+typedef struct TrapContext TrapContext;
+
 #define ISBSDTRACE (log_bsd || BSD_TRACING_ENABLED) 
 #define BSDTRACE(x) do { if (ISBSDTRACE) { write_log x; } } while(0)
 
@@ -35,6 +37,10 @@ extern void deinit_socket_layer (void);
 #ifdef _WIN32
 #define SOCKET_TYPE SOCKET
 #else
+#ifndef INVALID_SOCKET
+#define INVALID_SOCKET (-1)
+#endif
+typedef int SOCKET;
 #define SOCKET_TYPE int
 #endif
 
@@ -97,6 +103,7 @@ struct socketbase {
     uae_u32 sets [3];
     uae_u32 timeout;
     uae_u32 sigmp;
+    TrapContext *context;
 #endif
 };