device_io.h: forward declare ntfs_device struct.

Fixes compiler error:

win32_io.c:2037:5: error: conflicting types for 'ntfs_device_win32_ftruncate'; have 'int(struct ntfs_device *, s64)' {aka 'int(struct ntfs_device *, long int)'}
 2037 | int ntfs_device_win32_ftruncate(struct ntfs_device *dev, s64 size)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/ntfs-3g/device.h:30,
                 from win32_io.c:77:
../include/ntfs-3g/device_io.h:75:5: note: previous declaration of 'ntfs_device_win32_ftruncate' with type 'int(struct ntfs_device *, s64)' {aka 'int(struct ntfs_device *, long int)'}
   75 | int ntfs_device_win32_ftruncate(struct ntfs_device*, s64);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
pull/106/head
CodingKoopa 2024-03-08 06:13:18 +00:00
parent ecfe5e1af3
commit 64f3464378
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ struct hd_geometry {
/* On Windows (and Cygwin) : use Win32 low level device operations. */
#define ntfs_device_default_io_ops ntfs_device_win32_io_ops
/* Forward declaration. */
struct ntfs_device;
/* A few useful functions */
int ntfs_win32_set_sparse(int);
int ntfs_win32_ftruncate(int fd, s64 size);