mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 16:20:08 +02:00
140 lines
3.7 KiB
Plaintext
140 lines
3.7 KiB
Plaintext
From ed4728017e63bf8b6046da6542287a22ceeb1944 Mon Sep 17 00:00:00 2001
|
|
From: Chris Roberts <cpr420@gmail.com>
|
|
Date: Sun, 24 Nov 2013 23:50:21 -0700
|
|
Subject: applying patch ffsb-6.0-rc2.patch
|
|
|
|
|
|
diff --git a/fh.c b/fh.c
|
|
index f99b455..a1e8236 100644
|
|
--- a/fh.c
|
|
+++ b/fh.c
|
|
@@ -74,7 +74,9 @@ static int fhopenhelper(char *filename, char *bufflags, int flags,
|
|
int need_stats = ft_needs_stats(ft, SYS_OPEN) ||
|
|
fs_needs_stats(fs, SYS_OPEN);
|
|
|
|
- flags |= O_LARGEFILE;
|
|
+#ifndef __HAIKU__
|
|
+ flags |= O_LARGEFILE;
|
|
+#endif
|
|
|
|
if (need_stats)
|
|
gettimeofday(&start, NULL);
|
|
diff --git a/parser.c b/parser.c
|
|
index 8f3f086..98d8479 100644
|
|
--- a/parser.c
|
|
+++ b/parser.c
|
|
@@ -320,7 +320,8 @@ static container_t *init_container(void)
|
|
static int set_option(char *buf, config_options_t *options)
|
|
{
|
|
void *value;
|
|
-
|
|
+ value_list_t *tmp_list, *tmp_list2;
|
|
+
|
|
while (options->name) {
|
|
switch (options->type) {
|
|
case TYPE_WEIGHT:
|
|
@@ -392,7 +393,6 @@ out:
|
|
INIT_LIST_HEAD(&lhead->list);
|
|
options->value = lhead;
|
|
}
|
|
- value_list_t *tmp_list, *tmp_list2;
|
|
tmp_list = malloc(sizeof(struct value_list));
|
|
INIT_LIST_HEAD(&tmp_list->list);
|
|
tmp_list->value = value;
|
|
@@ -567,6 +567,7 @@ double get_config_double(config_options_t *config, char *name)
|
|
static profile_config_t *parse(FILE *f)
|
|
{
|
|
char *buf;
|
|
+ int is_option;
|
|
profile_config_t *profile_conf;
|
|
container_t *tmp_container;
|
|
|
|
@@ -575,9 +576,8 @@ static profile_config_t *parse(FILE *f)
|
|
memcpy(profile_conf->global, global_options, sizeof(global_options));
|
|
profile_conf->fs_container = NULL;
|
|
profile_conf->tg_container = NULL;
|
|
- int is_option;
|
|
- buf = get_next_line(f);
|
|
|
|
+ buf = get_next_line(f);
|
|
while (buf) {
|
|
is_option = set_option(buf, profile_conf->global);
|
|
tmp_container = search_group(buf, f);
|
|
@@ -858,6 +858,7 @@ static void init_filesys(ffsb_config_t *fc, int num)
|
|
profile_config_t *profile_conf = fc->profile_conf;
|
|
ffsb_fs_t *fs = &fc->filesystems[num];
|
|
value_list_t *tmp_list, *list_head;
|
|
+ ffsb_tg_t *age_tg;
|
|
|
|
memset(fs, 0, sizeof(ffsb_fs_t));
|
|
|
|
@@ -910,7 +911,7 @@ static void init_filesys(ffsb_config_t *fc, int num)
|
|
}
|
|
|
|
age_cont = age_cont->child;
|
|
- ffsb_tg_t *age_tg = ffsb_malloc(sizeof(ffsb_tg_t));
|
|
+ age_tg = ffsb_malloc(sizeof(ffsb_tg_t));
|
|
init_threadgroup(fc, age_cont->config, age_tg, 0);
|
|
fs->aging_tg = age_tg;
|
|
fs->age_fs = 1;
|
|
diff --git a/util.c b/util.c
|
|
index df5d755..84b6513 100644
|
|
--- a/util.c
|
|
+++ b/util.c
|
|
@@ -190,9 +190,14 @@ double cpu_so_far_children(void)
|
|
/* !!!! check portability */
|
|
float getfsutil(char *dirname)
|
|
{
|
|
- struct statvfs64 fsdata;
|
|
+#ifdef __HAIKU__
|
|
+ struct statvfs fsdata;
|
|
|
|
+ statvfs(dirname, &fsdata);
|
|
+#else
|
|
+ struct statvfs64 fsdata;
|
|
statvfs64(dirname, &fsdata);
|
|
+#endif
|
|
|
|
/* return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */
|
|
/* (float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */
|
|
@@ -202,8 +207,13 @@ float getfsutil(char *dirname)
|
|
|
|
uint64_t getfsutil_size(char *dirname)
|
|
{
|
|
+#ifdef __HAIKU__
|
|
+ struct statvfs fsdata;
|
|
+ statvfs(dirname, &fsdata);
|
|
+#else
|
|
struct statvfs64 fsdata;
|
|
statvfs64(dirname, &fsdata);
|
|
+#endif
|
|
|
|
return (fsdata.f_blocks - fsdata.f_bfree) * fsdata.f_bsize;
|
|
}
|
|
--
|
|
1.8.3.4
|
|
|
|
|
|
From bac090a21efe6efaa5334b357d8c0ec73a5135b0 Mon Sep 17 00:00:00 2001
|
|
From: Chris Roberts <cpr420@gmail.com>
|
|
Date: Sun, 24 Nov 2013 23:52:13 -0700
|
|
Subject: Update configure.in for newer autotools
|
|
|
|
|
|
diff --git a/configure.in b/configure.in
|
|
index 668e080..96514e8 100644
|
|
--- a/configure.in
|
|
+++ b/configure.in
|
|
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT(main.c)
|
|
AM_INIT_AUTOMAKE(ffsb, 6.0-RC2)
|
|
|
|
-AM_CONFIG_HEADER(config.h)
|
|
+AC_CONFIG_HEADERS([config.h])
|
|
AC_CANONICAL_HOST
|
|
|
|
dnl need to define _ALL_SOURCE and _THREAD_SAFE on AIX
|
|
--
|
|
1.8.3.4
|
|
|