| #ifdef HAVE_LINUX_MODULE_H |
| #include <linux/module.h> |
| #ifndef MODULE_INIT_IGNORE_MODVERSIONS |
| # define MODULE_INIT_IGNORE_MODVERSIONS 1 |
| #ifndef MODULE_INIT_IGNORE_VERMAGIC |
| # define MODULE_INIT_IGNORE_VERMAGIC 2 |
| #ifndef __NR_finit_module |
| # define __NR_finit_module -1 |
| #ifndef HAVE_FINIT_MODULE |
| static inline int finit_module(int fd, const char *uargs, int flags) |
| if (__NR_finit_module == -1) { |
| return syscall(__NR_finit_module, fd, uargs, flags); |
| #if (!HAVE_DECL_STRNDUPA && !defined(__APPLE__)) |
| const char *__old = (s); \ |
| size_t __len = strnlen(__old, (n)); \ |
| char *__new = alloca(__len + 1); \ |
| memcpy(__new, __old, __len); \ |
| #if __BYTE_ORDER == __LITTLE_ENDIAN |
| #define be32toh(x) bswap_32 (x) |