diff options
| author | Brent Cook <busterb@gmail.com> | 2025-10-07 03:49:29 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2025-10-07 04:23:58 -0500 |
| commit | 659e87fe1cf3348a4e9f1bacfe205316fefd8a51 (patch) | |
| tree | 0bdf3c16aae53f30aceffc7848076f49ea84bdb4 /crypto/compat | |
| parent | 2f78b04fd75ae457f8a1297909dd3b6f612bd21f (diff) | |
| download | portable-659e87fe1cf3348a4e9f1bacfe205316fefd8a51.tar.gz portable-659e87fe1cf3348a4e9f1bacfe205316fefd8a51.tar.bz2 portable-659e87fe1cf3348a4e9f1bacfe205316fefd8a51.zip | |
move ftruncate to common libcompat for tests
Diffstat (limited to 'crypto/compat')
| -rw-r--r-- | crypto/compat/ftruncate.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/compat/ftruncate.c b/crypto/compat/ftruncate.c new file mode 100644 index 0000000..e825e50 --- /dev/null +++ b/crypto/compat/ftruncate.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | * Public domain | ||
| 3 | * | ||
| 4 | * Kinichiro Inoguchi <inoguchi@openbsd.org> | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifdef _WIN32 | ||
| 8 | |||
| 9 | #include <unistd.h> | ||
| 10 | |||
| 11 | int | ||
| 12 | ftruncate(int fd, off_t length) | ||
| 13 | { | ||
| 14 | return _chsize(fd, length); | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif | ||
