]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/files/default/flush/flush.c
Remove forced downgrade of hp-health
[chef.git] / cookbooks / planet / files / default / flush / flush.c
1 #include <dlfcn.h>
2 #include <unistd.h>
3
4 static int (*real_close)(int fd);
5
6 static void __attribute__((constructor)) initialise(void)
7 {
8   real_close = dlsym(RTLD_NEXT, "close");
9 }
10
11 int close(int fd)
12 {
13   fdatasync(fd);
14
15   return real_close(fd);
16 }