Git init
[external/insserv.git] / debian / patches / 91_kfreebsd_nofadvice.patch
1 Purpose: Get insserv building on kfreebsd, missing the argument values for posix_fadvise().
2 Fixes:   #?
3 Status:  Not yet submitted upstream.
4 ---
5 Index: insserv/insserv.c
6 ===================================================================
7 --- insserv.orig/insserv.c      2009-09-26 22:35:39.000000000 +0200
8 +++ insserv/insserv.c   2009-09-26 22:35:40.000000000 +0200
9 @@ -40,6 +40,13 @@
10  #endif /* USE_RPMLIB */
11  #include "listing.h"
12  
13 +#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
14 +/* kfreebsd fail to provide working posix_fadvise */
15 +#  ifndef POSIX_FADV_SEQUENTIAL
16 +#    define posix_fadvise(fd, off, len, adv)        (-1)
17 +#  endif
18 +#endif
19 +
20  #ifdef SUSE
21  # define DEFAULT_START_LVL     "3 5"
22  # define DEFAULT_STOP_LVL      "3 5"