Skip to content

Commit

Permalink
target: define ssize_t and mode_t for MSVC
Browse files Browse the repository at this point in the history
MSVC doesn't have either of these symbols defined. However, they are
just alises for existing types, so manually redefine these in the target
header file.

Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs committed Oct 30, 2023
1 parent a61e0e8 commit a6dca56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/include/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
#include <stdint.h>
#include <sys/types.h>

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
typedef unsigned int mode_t;
#endif /* _MSC_VER */

typedef struct target target_s;
typedef uint32_t target_addr_t;
typedef struct target_controller target_controller_s;
Expand Down

0 comments on commit a6dca56

Please sign in to comment.