On Wed, Jun 15, 2005 at 12:48:38AM +0800, Ivan Wong wrote:
> Hi,
> > Odd, when creating a simple sample program that calls posix_fadvise it works
> > fine on both 2.4 and 2.6 kernels.
> Attached please find the source of my testing program. In fact, it
> actually does:
> 
> int main()
> {
>         int fd;
> 
>         fd = open("a.c", 0);
>         posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
>         close(fd);
> }
> 
> If I compile with `gcc -D_POSIX_C_SOURCE=200112L a.c`, no error.
> 
> I tried to build it using the same environment as gmoe-vfs2's modules by:
> 
> 1. copy a.c to gnome-vfs2-2.10.1/modules
> 2. adding these two lines to Makefile.am
> 
> bin_PROGRAMS = a
> a_SOURCES = a.c
> 
> 3. `make a`
> 4. `./a` -> Segmentation fault
> 
> Now it's obviously that it's something to do with the building
> configuration.

Right, very interesting.. Thanks for you debugging efforts! Lemme see if i can
trace this back to the real cause :)

  Sjoerd
-- 
You climb to reach the summit, but once there, discover that all roads
lead down.
                -- Stanislaw Lem, "The Cyberiad"


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to