sysquotas.h: collect more platform quotablock sizes
authorBjoern Jacke <bj@sernet.de>
Thu, 31 Jan 2019 18:01:36 +0000 (12:01 -0600)
committerBjoern Jacke <bjacke@samba.org>
Sun, 17 Feb 2019 12:33:13 +0000 (13:33 +0100)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/include/sysquotas.h

index 71d5e9b264013fd42a1ff83d4f50d06fed658087..7ba631e4e76fed6a56fed488b8d2a83fcfe69610 100644 (file)
@@ -69,7 +69,17 @@ typedef struct _SMB_DISK_QUOTA {
 } SMB_DISK_QUOTA;
 
 #ifndef QUOTABLOCK_SIZE
+#if defined(DQBSIZE)                          /* AIX */
+#define QUOTABLOCK_SIZE    DQBSIZE
+#elif defined(QIF_DQBLKSIZE)                  /* Linux */
+#define QUOTABLOCK_SIZE    QIF_DQBLKSIZE
+#elif defined(HAVE_STRUCT_DQBLK_DQB_CURBYTES) /*Darwin */
+#define QUOTABLOCK_SIZE 1
+#elif defined(HAVE_UFS_UFS_QUOTA_H)           /* BSDs */
+#define QUOTABLOCK_SIZE 512
+#else
 #define QUOTABLOCK_SIZE 1024
 #endif
+#endif /* QUOTABLOCK_SIZE */
 
 #endif /*_SYSQUOTAS_H */