ntfsclone.c: use setmode from header

Fixes linker error:

/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: ntfsclone.o: in function `open_image':
/cygdrive/e/Documents/Programs/ntfs-3g/ntfsprogs/ntfsclone.c:2385:(.text.startup+0x34e): undefined reference to `setmode'
pull/106/head
CodingKoopa 2024-03-08 04:20:02 -05:00
parent 69c2377280
commit e2f2bfbe78
1 changed files with 4 additions and 0 deletions

View File

@ -110,10 +110,14 @@
#endif
#ifdef HAVE_WINDOWS_H
#ifdef __CYGWIN__
#include <io.h>
#else
/*
* Replacements for functions which do not exist on Windows
*/
int setmode(int, int); /* from msvcrt.dll */
#endif
#define getpid() (0)
#define srandom(seed) srand(seed)