Browse Source

fix lilv build under Haiku

tags/v0.9.0
falkTX 13 years ago
parent
commit
a6fa89b6a0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      c++/carla-lilv/lilv-0.14.2/src/util.c

+ 3
- 3
c++/carla-lilv/lilv-0.14.2/src/util.c View File

@@ -269,10 +269,10 @@ lilv_copy_file(const char* src, const char* dst)
return 2; return 2;
} }


static const size_t PAGE_SIZE = 4096;
char* page = (char*)malloc(PAGE_SIZE);
static const size_t page_size = 4096;
char* page = (char*)malloc(page_size);
size_t n_read = 0; size_t n_read = 0;
while ((n_read = fread(page, 1, PAGE_SIZE, in)) > 0) {
while ((n_read = fread(page, 1, page_size, in)) > 0) {
if (fwrite(page, 1, n_read, out) != n_read) { if (fwrite(page, 1, n_read, out) != n_read) {
LILV_ERRORF("write to %s failed (%s)\n", dst, strerror(errno)); LILV_ERRORF("write to %s failed (%s)\n", dst, strerror(errno));
break; break;


Loading…
Cancel
Save