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 Nov 29, 2023
1 parent d66c4b5 commit 6c61d4b
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 int32_t 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 6c61d4b

Please sign in to comment.