I'm trying to compile 2.42 on opensolaris 5.11 (yes its old). I've done alot of searching and managed to find the bug tracker issues fixing utp pragma definitions. However i'm stumped on why when I get to compiling fdlimit i get alot of errors relating to POSIX_FADV values being undeclared. Any help would be greatly appreciated. Below is the output of make where compilation fails.
fdlimit.c: In function `preallocate_file_full':
fdlimit.c:150: warning: implicit declaration of function `posix_fallocate'
fdlimit.c:150: warning: nested extern declaration of `posix_fallocate'
fdlimit.c: In function `tr_prefetch':
fdlimit.c:240: warning: implicit declaration of function `posix_fadvise'
fdlimit.c:240: warning: nested extern declaration of `posix_fadvise'
fdlimit.c:240: error: `POSIX_FADV_WILLNEED' undeclared (first use in this function)
fdlimit.c:240: error: (Each undeclared identifier is reported only once
fdlimit.c:240: error: for each function it appears in.)
fdlimit.c: In function `tr_set_file_for_single_pass':
fdlimit.c:260: warning: nested extern declaration of `posix_fadvise'
fdlimit.c:240: warning: redundant redeclaration of 'posix_fadvise'
fdlimit.c:240: warning: previous implicit declaration of 'posix_fadvise' was here
fdlimit.c:260: error: `POSIX_FADV_SEQUENTIAL' undeclared (first use in this function)
fdlimit.c: In function `tr_close_file':
fdlimit.c:295: warning: nested extern declaration of `posix_fadvise'
fdlimit.c:240: warning: redundant redeclaration of 'posix_fadvise'
fdlimit.c:240: warning: previous implicit declaration of 'posix_fadvise' was here
fdlimit.c:295: error: `POSIX_FADV_DONTNEED' undeclared (first use in this function)
make[1]: *** [fdlimit.o] Error 1
fdlimit.c OpenSolaris compile issue
Re: fdlimit.c OpenSolaris compile issue
fixed. Manually defined a fadvise.h file and added it to fdlimit.h. compiled and runs. Thanks