Skip to content

Commit 282503d

Browse files
committed
adapter/syscall: fix ioctl conflicting types compile error (#942)
1 parent 46f93d4 commit 282503d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adapter/syscall/ff_linux_syscall.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
struct ff_linux_syscall {
2323
#define FF_SYSCALL_DECL(ret, fn, args) ret (*pf_##fn) args;
2424
#include "ff_declare_syscalls.h"
25+
/* ioctl removed from ff_declare_syscalls.h (issue #942 fix), add manually */
26+
int (*pf_ioctl)(int, unsigned long, unsigned long);
2527
};
2628

2729
static int linux_syscall_inited;
@@ -44,6 +46,8 @@ linux_syscall_load_symbol()
4446
#define FF_SYSCALL_DECL(ret, fn, args) \
4547
syscalls.pf_##fn = (typeof(syscalls.pf_##fn))dlsym(linux_lib_handle, #fn);
4648
#include <ff_declare_syscalls.h>
49+
/* ioctl removed from ff_declare_syscalls.h (issue #942 fix), load manually */
50+
syscalls.pf_ioctl = (typeof(syscalls.pf_ioctl))dlsym(linux_lib_handle, "ioctl");
4751

4852
return 0;
4953
}

0 commit comments

Comments
 (0)