cgit-dlsym.patch (611B)
1 --- filter.c.old 2014-06-14 15:57:03.908481247 +0200 2 +++ filter.c 2014-06-14 15:57:06.132481156 +0200 3 @@ -49,16 +49,6 @@ 4 5 void cgit_init_filters(void) 6 { 7 - libc_write = dlsym(RTLD_NEXT, "write"); 8 - if (!libc_write) 9 - die("Could not locate libc's write function"); 10 -} 11 - 12 -ssize_t write(int fd, const void *buf, size_t count) 13 -{ 14 - if (fd != STDOUT_FILENO || !filter_write) 15 - return libc_write(fd, buf, count); 16 - return filter_write(current_write_filter, buf, count); 17 } 18 19 static inline void hook_write(struct cgit_filter *filter, ssize_t (*new_write)(struct cgit_filter *base, const void *buf, size_t count))