From 5605a5ddf3c77232b04c002a82b91e227c0f27da Mon Sep 17 00:00:00 2001 From: Ren Kararou Date: Sun, 5 Jan 2025 02:29:15 -0600 Subject: builds on illumos, freebsd, and linux --- inc/handlers.h | 7 +++++-- inc/netascii.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/handlers.h b/inc/handlers.h index c174b6a..6be05da 100644 --- a/inc/handlers.h +++ b/inc/handlers.h @@ -4,9 +4,12 @@ #include #include "packet.h" +#define NBD_NBTPD_ARGS_PATH_MAX 768 +#define NBD_NBTPD_ARGS_MODE_MAX 32 + typedef struct { - char path[768]; - char mode[32]; + char path[NBD_NBTPD_ARGS_PATH_MAX]; + char mode[NBD_NBTPD_ARGS_MODE_MAX]; nbd_tftp_ecode err; struct sockaddr_in client; } nbd_nbtpd_args; diff --git a/inc/netascii.h b/inc/netascii.h index ada2051..ae80bae 100644 --- a/inc/netascii.h +++ b/inc/netascii.h @@ -1,9 +1,10 @@ #ifndef NBD_NETASCII_H #define NBD_NETASCII_H #include +#include uint8_t is_netascii_char(char c); uint8_t is_netascii_str(char *str); -uint8_t is_netascii_buf(char *buf, uint64_t len); +uint8_t is_netascii_buf(char *buf, size_t len); #endif -- cgit 1.4.1-2-gfad0