pfiles.stp doesn't compile anymore with my current kernel 3.5.4-1.fc17.x86_64 It is complaining: error: implicit declaration of function ‘FD_ISSET’ [-Werror=implicit-function-declaration] I think this has something to do with this bug report: "__NFDBITS conflict between sys/select.h and linux/posix_types.h" https://bugzilla.redhat.com/show_bug.cgi?id=837641 But this is for a kernel space script, and that report is for user land code. What should pfiles.stp include to get the correct FD_* definitions?
(In reply to comment #0) > pfiles.stp doesn't compile anymore with my current kernel 3.5.4-1.fc17.x86_64 > It is complaining: > > error: implicit declaration of function ‘FD_ISSET’ > [-Werror=implicit-function-declaration] > > I think this has something to do with this bug report: > "__NFDBITS conflict between sys/select.h and linux/posix_types.h" > https://bugzilla.redhat.com/show_bug.cgi?id=837641 > > But this is for a kernel space script, and that report is for user land code. It's true, that commit 8ded2bbc removed the FD_ISSET macro from the kernel. Even before that though, it was simply a wrapper for __FD_ISSET, which was removed earlier in commit cf420048. > What should pfiles.stp include to get the correct FD_* definitions? The previous __FD_ISSET was very simple: static inline int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__fdsetp) { return test_bit(__fd, __fdsetp->fds_bits); } It should be fine for pfiles.stp to use test_bit the same way.
commit 95b4f5c10dd5bdf63a32b62d1e8fd08f9cf80a2e Author: Mark Wielaard <mjw@redhat.com> Date: Sat Sep 29 10:24:38 2012 +0200 PR14642 pfiles.stp: Use test_bit directly instead of FD_ISSET. FD_ISSET might not be defined on all kernels. Tested against 3.5.4-1.fc17.x86_64 and 2.6.18-308.1.1.el5 (i686).