From f12d10a9884f136c53b31da4e7641d4ce9e2d478 Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Wed, 13 Aug 2025 17:06:38 +0900 Subject: [PATCH] use size_t for bitrate (for portability) --- include/mscp.h | 1 + src/bwlimit.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/mscp.h b/include/mscp.h index 6444463..236f526 100644 --- a/include/mscp.h +++ b/include/mscp.h @@ -28,6 +28,7 @@ #include #include +#include #define MSCP_DIRECTION_L2R 1 /** Indicates local to remote copy */ #define MSCP_DIRECTION_R2L 2 /** Indicates remote to local copy */ diff --git a/src/bwlimit.h b/src/bwlimit.h index 58cdd8d..650ed74 100644 --- a/src/bwlimit.h +++ b/src/bwlimit.h @@ -9,10 +9,10 @@ #include struct bwlimit { - sem_t *sem; /* semaphore */ - uint64_t bps; /* limit bit-rate (bps) */ - uint64_t win; /* window size (msec) */ - size_t amt; /* amount of bytes can be sent in a window */ + sem_t *sem; /* semaphore */ + size_t bps; /* limit bit-rate (bps) */ + size_t win; /* window size (msec) */ + size_t amt; /* amount of bytes can be sent in a window */ ssize_t credit; /* remaining bytes can be sent in a window */ struct timespec wstart, wend; /* window start time and end time */