modify_ldt() was declared as an external symbol. Despite the man page for this syscall telling that there is no wrapper in glibc, since version 2.1 there actually is, so linking to the glibc works.
Since modify_ldt() is not a POSIX interface, other libc implementations do not always provide a wrapper function. Even glibc headers do not provide a corresponding declaration. So go the recommended way to call this using syscall(). Signed-off-by: Hans-Werner Hilse <hwhi...@gmail.com> --- arch/x86/um/ldt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c index 9701a4f..6e57c22 100644 --- a/arch/x86/um/ldt.c +++ b/arch/x86/um/ldt.c @@ -11,8 +11,14 @@ #include <os.h> #include <skas.h> #include <sysdep/tls.h> +#include <unistd.h> +#include <sys/syscall.h> + +static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) +{ + return syscall(SYS_modify_ldt, func, ptr, bytecount); +} -extern int modify_ldt(int func, void *ptr, unsigned long bytecount); static long write_ldt_entry(struct mm_id *mm_idp, int func, struct user_desc *desc, void **addr, int done) -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel