Skip to content

Commit 77265ee

Browse files
committed
use size_t for bitrate (for portability)
1 parent 92538dc commit 77265ee

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

include/mscp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include <stdbool.h>
3030
#include <limits.h>
31+
#include <stdlib.h>
3132

3233
#define MSCP_DIRECTION_L2R 1 /** Indicates local to remote copy */
3334
#define MSCP_DIRECTION_R2L 2 /** Indicates remote to local copy */

src/bwlimit.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include <semaphore.h>
1010

1111
struct bwlimit {
12-
sem_t *sem; /* semaphore */
13-
uint64_t bps; /* limit bit-rate (bps) */
14-
uint64_t win; /* window size (msec) */
15-
size_t amt; /* amount of bytes can be sent in a window */
12+
sem_t *sem; /* semaphore */
13+
size_t bps; /* limit bit-rate (bps) */
14+
size_t win; /* window size (msec) */
15+
size_t amt; /* amount of bytes can be sent in a window */
1616

1717
ssize_t credit; /* remaining bytes can be sent in a window */
1818
struct timespec wstart, wend; /* window start time and end time */

0 commit comments

Comments
 (0)