Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGDMk9Fo05xj-Wof6gj-hOO1fuRaQdfurpxguxYppF983mP_kQ@mail.gmail.com>
Date: Thu, 26 Apr 2018 15:54:19 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>
Cc: John Mudd <johnbmudd@...il.com>
Subject: posix_fallocate() fails on some machines

I built a 32-bit dynamically linked Postgres using musl but I can't run on
some machines because posix_fallocate() returns 95, "not supported".

Here's a sample program that reproduces the issue even when compiled
statically. Any suggestions?

# Build a 32-bit static executable. Works.
$ cat test_posix_fallocate.c
#include <stdio.h>
#include <fcntl.h>
int main() {
    int fd = open("foo", O_RDWR|O_CREAT, 0666);
    if (fd < 0) return 1;
    printf("posix_fallocate() returned %d\n", posix_fallocate(fd, 0,
400000));
}
$
$ uname -mrs
Linux 4.4.0-116-generic i686
$ musl-gcc -static -o test_posix_fallocate test_posix_fallocate.c
$ test_posix_fallocate
posix_fallocate() returned 0
$

# Copy it to an older OS. Fails.
$ uname -mrs
Linux 2.6.32-358.14.1.el6.x86_64 x86_64
$ test_posix_fallocate
posix_fallocate() returned 95
$

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.