From e975db6fd59698ad12bfefae489ddd6e01d68cc5 Mon Sep 17 00:00:00 2001 From: cha0smaster Date: Sun, 8 Jan 2006 15:53:27 +0000 Subject: [PATCH] should fix build under Solaris --- include/ntfs/dir.h | 7 ++++++- include/ntfs/volume.h | 21 +++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/ntfs/dir.h b/include/ntfs/dir.h index 8b56c669..2483dc0c 100644 --- a/include/ntfs/dir.h +++ b/include/ntfs/dir.h @@ -2,7 +2,7 @@ * dir.h - Exports for directory handling. Part of the Linux-NTFS project. * * Copyright (c) 2002 Anton Altaparmakov - * Copyright (c) 2005 Yura Pakhuchiy + * Copyright (c) 2005-2006 Yura Pakhuchiy * Copyright (c) 2004-2005 Richard Russon * * This program/include file is free software; you can redistribute it and/or @@ -74,6 +74,11 @@ extern int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, #define NTFS_DT_SOCK 12 #define NTFS_DT_WHT 14 +/* DJGPP do not know about this. */ +#ifndef S_IFREG + +#endif + /* * This is the "ntfs_filldir" function type, used by ntfs_readdir() to let * the caller specify what kind of dirent layout it wants to have. diff --git a/include/ntfs/volume.h b/include/ntfs/volume.h index c3c36cb4..c884f494 100644 --- a/include/ntfs/volume.h +++ b/include/ntfs/volume.h @@ -2,7 +2,7 @@ * volume.h - Exports for NTFS volume handling. Part of the Linux-NTFS project. * * Copyright (c) 2000-2004 Anton Altaparmakov - * Copyright (c) 2005 Yura Pakhuchiy + * Copyright (c) 2005-2006 Yura Pakhuchiy * Copyright (c) 2004-2005 Richard Russon * * This program/include file is free software; you can redistribute it and/or @@ -45,14 +45,19 @@ * Under Cygwin, DJGPP and FreeBSD we do not have MS_RDONLY and MS_NOATIME, * so we define them ourselves. */ -#if !defined(MS_RDONLY) -/** - * enum MS_MOUNT - +#ifndef MS_RDONLY +#define MS_RDONLY 1 +#endif +/* + * Solaris defines MS_RDONLY but not MS_NOATIME thus we need to carefully + * define MS_NOATIME. */ -typedef enum { - MS_RDONLY = 1, - MS_NOATIME, -} MS_MOUNT; +#ifndef MS_NOATIME +#if (MS_RDONLY != 1) +# define MS_NOATIME 1 +#else +# define MS_NOATIME 2 +#endif #endif /* Forward declaration */